PR23611, objcopy is not removing executable relocatable sections
Michael Matz
matz@suse.de
Fri Sep 14 12:51:00 GMT 2018
Hi,
On Wed, 12 Sep 2018, Andrew Burgess wrote:
> > Kamlesh's patch to make --remove-relocations remove all types of reloc
> > section, but on reconsidering decided the existing behaviour was worth
> > keeping despite needing to document it.
>
> This is what puzzles me about this discussion. You saw value in
> --remove-relocations NOT being able to remove some relocation
> sections?
>
> What value can that possibly have?
relocations emitted by --emit-relocs into DSOs aren't necessary at runtime
(which is why they aren't emitted by default), dynamic relocations are.
As the latter are part of the process image they aren't actually just
placed in sections but also in segments. You can't remove such pieces
easily, you could only nullify them. If you do that the result will stop
working. So I'd ask the opposite question: what value can removing
dynamic relocations possibly have?
Ciao,
Michael.
More information about the Binutils
mailing list