From: Mark Wielaard Date: Thu, 31 Dec 2015 22:16:28 +0000 (+0100) Subject: elflint: Add _edata and _end to the list of possibly dangling gnuld symbols. X-Git-Tag: elfutils-0.165~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77e1739fc53c4021f6172955b73b2dce252d0709;p=thirdparty%2Felfutils.git elflint: Add _edata and _end to the list of possibly dangling gnuld symbols. gnuld might keep dangling/unused symbols around (see sourceware PR13621). Add _edata (end of initialized data address) and _end (end of uninitialized data address) to that list. They might have been added by gnuld even if there is no such [un]initialized data. Also add the double underscore variants which are used on some architectures. Signed-off-by: Mark Wielaard --- diff --git a/src/ChangeLog b/src/ChangeLog index b5b5e4a40..0bbfa5b94 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2015-12-31 Mark Wielaard + + * elflint.c (check_symtab): Add _edata and _end (plus extra underscore + variants) to to the list of possibly dangling symbols. + 2015-12-02 Mark Wielaard * nm.c (process_file): Accept fd and pass it on. diff --git a/src/elflint.c b/src/elflint.c index 7d72a1f79..bb97f5985 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -801,7 +801,11 @@ section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n"), && strcmp (name, "__bss_start") != 0 && strcmp (name, "__bss_start__") != 0 && strcmp (name, "__TMC_END__") != 0 - && strcmp (name, ".TOC.") != 0)) + && strcmp (name, ".TOC.") != 0 + && strcmp (name, "_edata") != 0 + && strcmp (name, "__edata") != 0 + && strcmp (name, "_end") != 0 + && strcmp (name, "__end") != 0)) ERROR (gettext ("\ section [%2d] '%s': symbol %zu: st_value out of bounds\n"), idx, section_name (ebl, idx), cnt);