This is the mail archive of the
mailing list for the binutils project.
Re: [GOLD] Add more params to relocate() and relocate_section()
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Cc: Cary Coutant <ccoutant at gmail dot com>, Ian Lance Taylor <iant at google dot com>
- Date: Wed, 2 Dec 2015 11:32:44 +1030
- Subject: Re: [GOLD] Add more params to relocate() and relocate_section()
- Authentication-results: sourceware.org; auth=none
- References: <20151125013517 dot GU8120 at bubble dot grove dot modra dot org>
On Wed, Nov 25, 2015 at 12:05:17PM +1030, Alan Modra wrote:
> Some linker code editing needs to change multiple insns. In some
> cases multiple relocations are involved and it is not sufficient to
> make the changes independently as relocations are processed, because
> doing so might lead to a partial edit. So in order to safely edit we
> need all the relocations available in relocate(). Also, to emit
> edited relocs corresponding to the edited code sequence we need some
> way to pass information from relocate() to relocate_relocs(),
> particularly if the edit depends on insns. We can't modify input
> relocs in relocate() as they are mmapped PROT_READ, nor it is
> particularly clean to write relocs to the output at that stage. So
> add a Relocatable_relocs* parameter to mark edited relocs.
> This patch adds the infrastructure without making use of it.
> Note that relocate() may be called with both of the new params NULL,
> when called from apply_relocation() for incremental relocation.
> OK to apply?
Australia Development Lab, IBM