[patch] MIPS gas problems with gcc's explicit relocs
Thiemo Seufer
ica2_ts@csv.ica.uni-stuttgart.de
Thu Jun 3 18:50:00 GMT 2004
Maciej W. Rozycki wrote:
[snip]
> > > I like the current behavior of gcc for being optimal.
> >
> > Creating broken code can hardly be called optimal.
>
> Please justify. Note e.g. "dla $4,0x100($2)" is currently OK, but you
> consider "dla $4,%lo(foo)($2)" bad. Why?
We misunderstood each other. I think adding in some register value
to dla is a misfeature of gas (I've expained in more detail in another
mail just sent).
Adding some code to handle
(d)la <reg>, %reloc(<sym>)
isn't wrong, but probably a bit nonsensical, given that (d)la is supposed
to do the expansion required to handle %reloc itself (for %reloc in
%highest, %higher, %hi, %lo).
[snip]
> > This would be broken syntax.
> >
> > <op> <reg>,<addr>
> >
> > loads an absolute address in a register, while
>
> Nope, it loads the content pointed to by addr, of which the register part
> happens to be $zero.
No, it doesn't dereference.
Thiemo
More information about the Binutils
mailing list