This is the mail archive of the
mailing list for the binutils project.
Re: deleting relocs, objcopy and BFD
- From: jose dot marchesi at oracle dot com (Jose E. Marchesi)
- To: Alan Modra <amodra at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 01 May 2017 13:20:37 +0200
- Subject: Re: deleting relocs, objcopy and BFD
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com> <20170501044543.GC24006@bubble.grove.modra.org>
> - The deletion logic in `merge_gnu_build_notes' then deletes two
> internal relocs, leaving 7. This sounds like a sequence of three
> internal relocs gets broken. I am not sure if this really a problem
> (don't know much of mips64) but it is worth a check.
This part of the problem is simply an error in Nick's code, fixed as
Ah, nice, thanks. I thought that if the code was deleting relocs
defined on the same address, they all should be removed, or none.
I've read over your description of the reloc count problem and am
not too sure what to do, but my inclination would be to not return a
count from bfd_canonicalize_reloc and not set one in bfd_set_reloc.
ie. rely on the sentinel. That will mean rewriting some code..
I am exploring that approach.