On Tue, May 2, 2017 at 7:50 AM, Nick Clifton wrote: > Hi Guys, > >> Problem 1: incoherence with internal relocs and external relocs breaks> the API. > I am checking in the attached patch in order to stop objcopy from attempting > to merge notes when the internal reloc count is greater than the external > reloc count. This does not fix the underlying problem, but it should at > least make objcopy safe, for now. > >> b) To remove the API limitation/bug in BFD, somehow. Maybe adding >> end-of-list sentinels to `sec->relocation' and `sec->orelocation', >> adjusting `bfd_set_reloc' to install it according to its `relcount' >> argument, leaving `sec->reloc_count' untouched, and also making >> `elfNN_BE_write_relocs' to use the sentinel when writing. > > I think that option b) would be better. I wonder though whether it might > be simpler to just let targets override the bfd_set_reloc () function with > their own implementation, should they have special requirements. I have not > investigated this yet, but it seems like it would be the simplest solution, > provided that it can be made to work. > I checked in this to fix build on 32-bit hosts. -- H.J.