Problem with .elseif conditional in binutils-2.10 gas
Michael Schwingen
rincewind@discworld.dascon.de
Fri Mar 30 12:55:00 GMT 2001
Hello,
I am having problems with the .elseif conditional in as of binutils 2.10
- at least I do not get what I expect from the documentation.
Given the following source code:
.if 1
.long 1
.elseif 1
.long 2
.elseif 1
.long 3
.elseif 1
.long 4
.elseif 1
.long 5
.else
.long 6
.endif
I would expect only one branch to be taken, so that exactly one .long ends
up in the output.
However, I get the following result:
$ powerpc-eabi-as -o 1.o 1.s
$ powerpc-eabi-objdump -D 1.o
1.o: file format elf32-powerpc
Disassembly of section .text:
00000000 <.text>:
0: 00 00 00 01 .long 0x1
4: 00 00 00 03 .long 0x3
8: 00 00 00 05 .long 0x5
It seems that every other path is included - do I misinterpret the
documentation, or is this considered a bug?
cu
Michael
--
In the beginning there was nothing, which exploded.
More information about the Binutils
mailing list