summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-04-29 14:05:44 -0700
committerUlrich Drepper <drepper@redhat.com>2009-04-29 14:05:44 -0700
commitc803fbe6c3fa15d08dee1c99948ec66326db1e9e (patch)
treeb182d207c6d231cf5db517cb43a981cde5d41424
parent8a3b0fae08eb62a1657d4f4e4b8083fe3e1a4f9e (diff)
downloadelfutils-c803fbe6c3fa15d08dee1c99948ec66326db1e9e.tar.gz
Add test of st_other field of symbol table entries.
-rw-r--r--ChangeLog4
-rw-r--r--src/elflint.c11
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f6d54aaa..797a7460 100644
--- 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.
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);
+
}
}