This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

"Unsupported Relocation Against" error when using la instruction with string


Hello all,

I'm having a problem loading an address of what I believe is a
symbol, I am not really sure as to where my problem lies, so
I'm posting my code, platform and compile steps.

The platform is a PowerPC 4xx.  I am using the latest cross
compilier from DENX Software Engineering (as of End Oct,
2004.)

<Start Code>

/* All of my code should be in this section, including the
   ascii string */
.section _boot_code,"ax"

/* This is a Null-Terminated String that I want to pass to
   a function in assembler that accepts the address of a
   string in a register (r9)
*/
_my_text:
   .ascii "My Null Terminated String\n\o"

/* I would expect this to load the address of _my_text
   into r9.  This Line actualy gives me the erroor.
*/
la   r9, _my_text(r0)

</End Code>

I don't believe that there is anything fundamentally wrong
with my above code.

I've tried to compile using the following

ppc-linux-as -many --warn -mregnames source.S -o source.o
and
ppc-linux-gcc -Wa,-gstabs -D__ASSEMBLY__  -g -Os -fPIC -ffixed-r14 -meabi \
                -Iinclude -fno-builtin -ffreestanding -nostdinc -pipe \
                -ffixed-r2 -ffixed-r29 -mstring -mregnames \
                -Wa,-m405,-mregnames -mcpu=405 -mhard-float-c \
                -o source.o source.S

And both cases give me the error:

source.S: Assembler messages:
source.S:62: Error: unsupported relocation against _my_text

Does anyone have any suggestions?
-- 
Bradley Remedios
bremedios@gmail.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]