bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

powerpc-linux-as rejects legitimate addressing. (OK with .equ)


From: Erik Christiansen
Subject: powerpc-linux-as rejects legitimate addressing. (OK with .equ)
Date: Fri, 28 Mar 2003 10:23:13 +1100
User-agent: Mutt/1.3.28i

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]