[ORLinux] ELF relocations for PIC support

Giuseppe Scrivano giuseppe at southpole.se
Fri Jun 17 18:22:41 CEST 2011


Hi Jeremy,

thanks for your reply.  Some observations:

On 16/06/2011 11:08, Jeremy Bennett wrote:
> A more fundamental issue is to define the ABI for PIC (you'll see that
> section in the manual is blank). One thought that the we restrict the
> GOT to 64KB and shared objects to 128MB, we can reserve r10 to point to
> the GOT. We also get some very compact sequences for handling the GOT
> and PLTs.
I guess the 64KB size depends from the offset that is possible to 
specify to a JUMP instruction.  Is the 128MB value related to the same 
reason (number of bytes of the immediate value considering the sign and 
the shift)?

Also, do we need a PLT or we can use just the GOT table?  What about the 
size for any entry in the GOT table?

I don't have other questions at the moment :-)

Thanks,
Giuseppe



More information about the Linux mailing list