This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
powerpc-linux-as rejects legitimate addressing. (OK with .equ)
- From: Erik Christiansen <erik at dd dot nec dot com dot au>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 27 Mar 2003 14:49:56 +1100
- Subject: powerpc-linux-as rejects legitimate addressing. (OK with .equ)
- Reply-to: erik at dd dot nec dot com dot au
Where is the problem:
---------------------
$ powerpc-linux-as --version
GNU assembler 2.13.90.0.4 20020814
What is the problem:
--------------------
$ powerpc-linux-as -mregnames -o gas_test.o gas_test.s
gas_test.s: Assembler messages:
gas_test.s:11: Error: unsupported relocation against bargraph
file: gas_test.s
========================================================================
.align 2
.=0x0130 # A)
bargraph: # This should work, but as complains.
.skip 4 #
# B)
# .equ bargraph , 0x130 # Assembles & runs OK, using this instead.
bump_bargraph:
lbz r7,bargraph(0) # Likes B), but not A).
========================================================================
What is expected:
-----------------
$ powerpc-linux-objdump -D gas_test.o
========================================================================
gas_test.o: file format elf32-powerpc
Disassembly of section .text:
00000000 <bump_bargraph>:
0: 88 e0 01 30 lbz r7,304(r0)
Disassembly of section .data:
========================================================================
(This is what case B gives.)
Why it is a problem:
--------------------
Accessing the top and bottom 32k of memory like this is documented
and kosher. Resorting to a .equ to help the assembler correctly
address a fixed point in memory is an error prone hack.
Tried the crossgcc mailing list & archives, but no joy. It look a lot
like a bug, but is it?
Regards,
Erik