This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PR23611, objcopy is not removing executable relocatable sections
On Tue, Sep 11, 2018 at 04:43:00PM +0000, Michael Matz wrote:
> Hi,
>
> On Tue, 11 Sep 2018, Alan Modra wrote:
>
> > Incidentally, another wart is that not all relocation sections start
> > with ".rela." or ".rel.". A section FOO has .relaFOO or .relFOO for
> > relocations.
>
> As it should be. The second '.' in ".rela.text" comes from ".text" not
> from ".rela.". If $section is "FOO" the relocation section should be
> named .relaFOO, and if it's "%bar" it should be named ".rela%bar"
> (assuming '%' is a valid section name character of course :) ).
We are in agreement up to this point.
> Everything else introduces special cases (e.g. what if there's a "FOO" and
> a ".FOO" section, vs. if there's _only_ a ".FOO" section?).
>
> > You might like to fix that, patch preapproved.
>
> Ugh, please don't.
At the moment "objcopy -R .relaFOO -R .relFOO" doesn't remove
relocations for section "FOO" in a relocatable object file. Why
shouldn't we make that work?
--
Alan Modra
Australia Development Lab, IBM