This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [GOLD] Add more params to relocate() and relocate_section()

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?


Alan Modra
Australia Development Lab, IBM

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]