This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/12851: --gc-sections doesn't work on note sections
On Wed, Jun 08, 2011 at 05:50:11PM -0700, H.J. Lu wrote:
> doesn't check relocations in SHT_NOTE sections.
I see.
> I don't know
> how default gc_mark_extra_sections can fix. Also when I add
> debug and special sections, I get linker regressions. It seems
> that we want to keep debug and special sections, but not sections
> referenced by them.
That's true, we don't want to keep sections referenced by debug
sections. It's also the case that adding a default
gc_mark_extra_sections really only benefits us if we want to implement
dropping notes and other special sections when all other sections in a
file are garbage collected. So for the time being I guess your patch
is OK if you remove the SHT_NOTE test in elf_gc_sweep. Please also
verify that your testcase behaves on Nick's large set of targets
before committing.
--
Alan Modra
Australia Development Lab, IBM