[LLVMdev] Question on ELF relocations and GNU ld compatibility

Tim Northover t.p.northover at gmail.com
Tue Jun 24 09:21:15 PDT 2014


Hi Dominique,

> My understanding is that now I have to ‘open’ the GNU ‘ld’ sources files to add the relocation schema for my ‘jump’ instruction.


Yep. The definition of all ELF relocation types is delegated to the
CPU architects by the top-level SystemV ABI specification.

There's not really any way around that, I'm afraid (at least, without
massive hackery like putting e_machine == EM_386 and hoping ld doesn't
actually do anything x86-specific).

Cheers.

Tim.




More information about the llvm-dev mailing list