This is the mail archive of the 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]

Re: m68k reloc types

Roman Zippel <> writes:

> Hi,
> On Mon, 16 Aug 2004, Andreas Schwab wrote:
>> Roman Zippel <> 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

>> > 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 Schwab, SuSE Labs,
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."

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