This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Problem with .elseif conditional in binutils-2.10 gas
- To: binutils at sourceware dot cygnus dot com
- Subject: Problem with .elseif conditional in binutils-2.10 gas
- From: Michael Schwingen <rincewind at discworld dot dascon dot de>
- Date: Fri, 30 Mar 2001 22:52:48 +0200
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.