Adding stubs with new symbols and relocs to a (elf32) bfd from within the linker.

Alan Modra amodra@gmail.com
Wed Oct 7 23:46:00 GMT 2015


On Wed, Oct 07, 2015 at 11:59:13PM +0200, Anthony Brandon wrote:
> The problem is that I also want the relocations and symbols to end up
> in the output bfd, but I can't figure out how to get this to work.

You might be better off looking at elf64-ppc.c or elf32-ppc.c rather
than the ARM backend.  PowerPC is one of the few targets that bothers
to emit relocs on linker generated code, or modify existing relocs to
suit linker edited code.  If you're already familiar with the ARM stub
handling code it shouldn't be too hard to understand the ppc64 stub
handling.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list