I ran into an assembler bug which affects at least MIPS GAS 2.7 and 2.8.1.
An example which triggers the bug:
[ralf@lappi ralf]$ cat s.s
.globl label1
label1:
.org 0x1000
.align 13 # align on 8kb boundary
[ralf@lappi /tmp]$ mips-linux-as -O3 -o s.o s.s
[ralf@lappi /tmp]$ mips-linux-objdump --syms s.o | grep label1
0000000000002000 g O .text 0000000000000000 label1
[ralf@lappi /tmp]$
=> Label label1 get's the wrong value 0x2000, not 0x0 as it should,
assigned. Inserting a label definition after the .org pseudo op generates
correct code again. I haven't tried this on non-MIPS GAS.
Ralf
|