[Nasm-bugs] [Bug 3392419] New: __OUTPUT_FORMAT__ doesn't seem to work
no-reply at bugzilla-nasm.gorcunov.org
no-reply at bugzilla-nasm.gorcunov.org
Fri Aug 4 00:58:05 PDT 2017
https://bugzilla.nasm.us/show_bug.cgi?id=3392419
Bug ID: 3392419
Summary: __OUTPUT_FORMAT__ doesn't seem to work
Product: NASM
Version: unspecified
Hardware: All
OS: All
Status: OPEN
Severity: normal
Priority: Medium
Component: Assembler
Assignee: nobody at nasm.us
Reporter: admin at agguro.be
CC: gorcunov at gmail.com, hpa at zytor.com, nasm-bugs at nasm.us
Obtained from: Binary from nasm.us
The predefined macro __OUTPUT_FORMAT__ doesn't do anything. When using it as
an example here:
CalcSum:
%ifidn __OUTPUT_FORMAT__ , elf32
%warning "****32 bits****"
bits 32
%define a [ebp+8]
%define b [ebp+12]
%define c [ebp+16]
push ebp
mov ebp,esp
mov eax,a
add eax,b
add eax,c
pop ebp
%elifidn __OUTPUT_FORMAT__ , elf64
%warning "****64 bits****"
bits 64
mov rax, rdi
add rax, rsi
add rax, rdx
%endif
ret
I just get this object file when using nasm -felf32 file.asm -o file.o
and hexdump -C file.o
00000000 25 6c 69 6e 65 20 31 2b 31 20 74 65 73 74 2d 6e |%line 1+1 test-n|
00000010 61 73 6d 2e 61 73 6d 0a 0a 0a 0a 0a 0a 0a 5b 67 |asm.asm.......[g|
00000020 6c 6f 62 61 6c 20 43 61 6c 63 53 75 6d 5d 0a 0a |lobal CalcSum]..|
00000030 5b 73 65 63 74 69 6f 6e 20 2e 74 65 78 74 5d 0a |[section .text].|
00000040 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 43 61 6c 63 53 75 |..........CalcSu|
00000050 6d 3a 0a 25 6c 69 6e 65 20 34 30 2b 31 20 74 65 |m:.%line 40+1 te|
00000060 73 74 2d 6e 61 73 6d 2e 61 73 6d 0a 20 72 65 74 |st-nasm.asm. ret|
00000070 0a
|.|
which is a text file only.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
More information about the Nasm-bugs
mailing list