"Unsupported Relocation Against" error when using la instruction with string
Ian Lance Taylor
ian@wasabisystems.com
Sat Dec 4 01:25:00 GMT 2004
Bradley Remedios <bremedios@gmail.com> writes:
> /* 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)
Why are you using _my_text as an index off of r0? That won't work.
_my_text is an absolute address, not an offset.
I recommend that you compile some simple C code with -S, and look at
how this sort of thing is handled by the C compiler.
Ian
More information about the Binutils
mailing list