From c803fbe6c3fa15d08dee1c99948ec66326db1e9e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 29 Apr 2009 14:05:44 -0700 Subject: Add test of st_other field of symbol table entries. --- src/elflint.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/elflint.c') diff --git a/src/elflint.c b/src/elflint.c index 7ddf3a9a..c04ae57f 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); + } } -- cgit v1.2.3