This is the mail archive of the
mailing list for the binutils project.
Re: Adding stubs with new symbols and relocs to a (elf32) bfd from within the linker.
- From: Alan Modra <amodra at gmail dot com>
- To: Anthony Brandon <anthony dot brandon at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 8 Oct 2015 10:16:42 +1030
- Subject: Re: Adding stubs with new symbols and relocs to a (elf32) bfd from within the linker.
- Authentication-results: sourceware.org; auth=none
- References: <CALsyMRiayjHPs0=kZt+4W--AHkJ+5YfrygRkFo0h6UJs9O4UNw at mail dot gmail dot com>
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
Australia Development Lab, IBM