[ORLinux] ELF relocations for PIC support
proljc at gmail.com
Wed Jun 15 15:09:50 CEST 2011
On Wed, Jun 15, 2011 at 8:50 PM, Giuseppe Scrivano
<giuseppe at southpole.se> wrote:
> I have started to look at the binutils codebase and I was wondering if
> somebody is already working on it and what new relocations are needed to
> support PIC.
> Any comment about these ones?
> /* The following four relocations are generated by the linker */
> /* Copy contents at dynlinking */
> RELOC_NUMBER (R_OR32_COPY, 7)
> /* Create GOT entry */
> RELOC_NUMBER (R_OR32_GLOB_DAT, 8)
> /* Create PLT entry */
> RELOC_NUMBER (R_OR32_JUMP_SLOT, 9)
> /* Adjust by program base */
> RELOC_NUMBER (R_OR32_RELATIVE, 10)
> /* 16-bit offset into GOT */
> RELOC_NUMBER (R_OR32_16_GOT, 11)
> /* 32-bit offset into GOT */
> RELOC_NUMBER (R_OR32_32_GOT, 12)
> /* The PLT is held as part of the GOT, so references into the
> * PLT are actually references into the GOT, too. PLT entries
> * are absolute, not PC-rel.
> /* 16-bit offset into PLT */
> RELOC_NUMBER (R_OR32_16_GOTPLT, 13)
> /* 32-bit offset into PLT */
> RELOC_NUMBER (R_OR32_32_GOTPLT, 14)
> Linux mailing list
> Linux at lists.openrisc.net
Sorry, I get late.
It just be some magic-numbers, it is about ELF GOT and so on...
More information about the Linux