m68k reloc types
Andreas Schwab
schwab@suse.de
Mon Aug 16 15:32:00 GMT 2004
Roman Zippel <zippel@linux-m68k.org> writes:
> Hi,
>
> On Mon, 16 Aug 2004, Andreas Schwab wrote:
>
>> Roman Zippel <zippel@linux-m68k.org> writes:
>>
>> > One issue that really confused me at first is that some m68k pic reloc
>> > types do something completely different than their i386 counterparts.
>>
>> The m68k has different capabilites than the i386.
>
> The capabilities are actually quite similiar, i386 has no direct pc
> relative addressing mode, but the trick used has the same effect from the
> linker pointer of view. What different kind of capabilities do you have in
> mind?
That the m68k can address directly relative to the pc obviates the need
for the klugey way the GOT register is set up on i386.
> That R_68K_GOT32O is the same as R_386_GOT32 is not a little confusing?
No. Why?
> What should we call R_386_GOTOFF if we wanted to implement it for the m68k
> linker?
There is no corresponding relocation defined for m68k, because it is not
needed.
>> > AFAICS it should be possible to fix this, existing binaries may not break
>> > of course, but I think it should be possible to just rename this
>> > within binutils.
>>
>> Why do you need to rename them? The names are defined by the ELF specs.
>
> Which I don't have access to. A quote of relevant parts would be helpful
The m68k processor supplement is only available on paper, and out of print
now. I have no information on any online reference, but I have a paper
copy of it.
> (especially the difference between R_68K_GOT32 and R_68K_GOT32O).
The first is a pc-relative offset to the GOT, the latter is the offset
from the start of the GOT.
> Could you please explain the rationale behind the _GLOBAL_OFFSET_TABLE_
> checks in elf32-m68k.c? Unfortunately the cvs history doesn't go that far.
This is a special symbol that always points to the start of the GOT.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Binutils
mailing list