From: Ulrich Drepper Date: Wed, 29 Apr 2009 21:05:44 +0000 (-0700) Subject: Add test of st_other field of symbol table entries. X-Git-Tag: elfutils-0.142~41^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c803fbe6c3fa15d08dee1c99948ec66326db1e9e;p=thirdparty%2Felfutils.git Add test of st_other field of symbol table entries. --- diff --git a/ChangeLog b/ChangeLog index f6d54aaa2..797a7460a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-04-29 Ulrich Drepper + + * elflint.c (check_symtab): Add tests of st_other field. + 2009-01-23 Roland McGrath * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3. diff --git a/src/elflint.c b/src/elflint.c index 7ddf3a9a3..c04ae57f8 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -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); + } }