summaryrefslogtreecommitdiff
path: root/nptl_db/db-symbols.awk
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-03-09 14:35:26 +0000
committerJakub Jelinek <jakub@redhat.com>2009-03-09 14:35:26 +0000
commit5c1d419918b3637170da9a5592049048aaf0ee49 (patch)
tree8ad672f8707275fdbeaf5b8a45eeb2bc8144623a /nptl_db/db-symbols.awk
parent48da74123eca38beeaec03d3d46ba09f069ef7dc (diff)
Updated to fedora-glibc-20090309T1421cvs/fedora-glibc-2_9_90-9
Diffstat (limited to 'nptl_db/db-symbols.awk')
-rw-r--r--nptl_db/db-symbols.awk45
1 files changed, 45 insertions, 0 deletions
diff --git a/nptl_db/db-symbols.awk b/nptl_db/db-symbols.awk
new file mode 100644
index 0000000000..33272138f7
--- /dev/null
+++ b/nptl_db/db-symbols.awk
@@ -0,0 +1,45 @@
+# This script processes the output of 'readelf -W -s' on the libpthread.so
+# we've just built. It checks for all the symbols used in td_symbol_list.
+
+BEGIN {
+%define DB_LOOKUP_NAME(idx, name) required[STRINGIFY (name)] = 1;
+%define DB_LOOKUP_NAME_TH_UNIQUE(idx, name) th_unique[STRINGIFY (name)] = 1;
+%include "db-symbols.h"
+
+ in_symtab = 0;
+}
+
+/Symbol table '.symtab'/ { in_symtab=1; next }
+NF == 0 { in_symtab=0; next }
+
+!in_symtab { next }
+
+NF >= 8 && $7 != "UND" { seen[$8] = 1 }
+
+END {
+ status = 0;
+
+ for (s in required) {
+ if (s in seen) print s, "ok";
+ else {
+ status = 1;
+ print s, "***MISSING***";
+ }
+ }
+
+ any = "";
+ for (s in th_unique) {
+ if (s in seen) {
+ any = s;
+ break;
+ }
+ }
+ if (any)
+ print "th_unique:", any;
+ else {
+ status = 1;
+ print "th_unique:", "***MISSING***";
+ }
+
+ exit(status);
+}