]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
elflint: Add _edata and _end to the list of possibly dangling gnuld symbols.
authorMark Wielaard <mjw@redhat.com>
Thu, 31 Dec 2015 22:16:28 +0000 (23:16 +0100)
committerMark Wielaard <mjw@redhat.com>
Tue, 5 Jan 2016 07:56:01 +0000 (08:56 +0100)
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 <mjw@redhat.com>
src/ChangeLog
src/elflint.c

index b5b5e4a405fb329e566fc44b48596407681c1b65..0bbfa5b940ac80530d367e575a88d14e71eca693 100644 (file)
@@ -1,3 +1,8 @@
+2015-12-31  Mark Wielaard  <mjw@redhat.com>
+
+       * 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  <mjw@redhat.com>
 
        * nm.c (process_file): Accept fd and pass it on.
index 7d72a1f7933164e5b0838a378b5edaa06abec484..bb97f5985d397447c86022ae9b0914e74bd9f154 100644 (file)
@@ -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);