[RFC] PR ld/13621

H.J. Lu hjl.tools@gmail.com
Sat May 5 14:42:00 GMT 2012

On Sun, Jan 29, 2012 at 4:56 PM, Richard Henderson <rth@redhat.com> wrote:
> This PR is about elflint warning about symbols outside of the section
> with which they are associated.
> The problem can be seen with just about any zero-sized section, nearly
> all of which are removed by strip_excluded_output_sections.  Then, the
> symbols are relocated to a "near by" section by _bfd_fix_excluded_sec_syms.
> This elflint warning will affect essentially all binaries built with
> gcc4.7 because of the crt symbol __TMC_END__, present in the normally
> empty section .tm_clone_table.  Thus it seems worthwhile to fix this.
> At first I attempted to SEC_KEEP any section with global symbols.  But
> this ran into all sorts of testsuite failures re .got.  In those cases
> the _GLOBAL_OFFSET_TABLE_ symbol still exists, which causes .got to
> be kept instead of removed as unused later in the link.
> A second best solution would seem to be to merely move the offending
> symbols to the ABS section rather than associate them with some random
> section.
> Thoughts?

This patch has been reverted.  Here is a different patch to keep
empty section if a definition uses it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-pr13621.patch
Type: application/octet-stream
Size: 3862 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20120505/d598f4e5/attachment.obj>

More information about the Binutils mailing list