]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Add test of st_other field of symbol table entries.
authorUlrich Drepper <drepper@redhat.com>
Wed, 29 Apr 2009 21:05:44 +0000 (14:05 -0700)
committerUlrich Drepper <drepper@redhat.com>
Wed, 29 Apr 2009 21:05:44 +0000 (14:05 -0700)
ChangeLog
src/elflint.c

index f6d54aaa269ff2f4a4f30c003f32d21ae8d6c729..797a7460afc183da6061f6ee7ba2e938753299f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-29  Ulrich Drepper  <drepper@redhat.com>
+
+       * elflint.c (check_symtab): Add tests of st_other field.
+
 2009-01-23  Roland McGrath  <roland@redhat.com>
 
        * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
index 7ddf3a9a3c5321880c0e07e4d7b493d8f3779d1e..c04ae57f87ad79037cba5d3f5267230a3e44fa5a 100644 (file)
@@ -976,6 +976,17 @@ section [%2d] '%s': _DYNAMIC symbol size %" PRIu64 " does not match dynamic segm
                  }
            }
        }
+
+      if (GELF_ST_VISIBILITY (sym->st_other) != STV_DEFAULT
+         && shdr->sh_type == SHT_DYNSYM)
+       ERROR (gettext ("\
+section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-default visibility\n"),
+              idx, section_name (ebl, idx), cnt);
+      if ((sym->st_other ^ GELF_ST_VISIBILITY (sym->st_other)) != 0)
+       ERROR (gettext ("\
+section [%2d] '%s': symbol %zu: unknown bit set in st_other\n"),
+              idx, section_name (ebl, idx), cnt);
+
     }
 }