diff options
author | Zack Weinberg <zackw@panix.com> | 2017-06-08 15:39:03 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2017-06-08 15:39:03 -0400 |
commit | 5046dbb4a7eba5eccfd258f92f4735c9ffc8d069 (patch) | |
tree | 4470480d904b65cf14ca524f96f79eca818c3eaf /REORG.TODO/nptl_db/db-symbols.awk | |
parent | 199fc19d3aaaf57944ef036e15904febe877fc93 (diff) | |
download | glibc-5046dbb4a7eba5eccfd258f92f4735c9ffc8d069.tar.gz glibc-5046dbb4a7eba5eccfd258f92f4735c9ffc8d069.tar.xz glibc-5046dbb4a7eba5eccfd258f92f4735c9ffc8d069.zip |
Prepare for radical source tree reorganization. zack/build-layout-experiment
All top-level files and directories are moved into a temporary storage directory, REORG.TODO, except for files that will certainly still exist in their current form at top level when we're done (COPYING, COPYING.LIB, LICENSES, NEWS, README), all old ChangeLog files (which are moved to the new directory OldChangeLogs, instead), and the generated file INSTALL (which is just deleted; in the new order, there will be no generated files checked into version control).
Diffstat (limited to 'REORG.TODO/nptl_db/db-symbols.awk')
-rw-r--r-- | REORG.TODO/nptl_db/db-symbols.awk | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/REORG.TODO/nptl_db/db-symbols.awk b/REORG.TODO/nptl_db/db-symbols.awk new file mode 100644 index 0000000000..eb089e188a --- /dev/null +++ b/REORG.TODO/nptl_db/db-symbols.awk @@ -0,0 +1,47 @@ +# 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_RTLD_VARIABLE(name) /* Nothing. */ +%define DB_MAIN_VARIABLE(name) /* Nothing. */ +%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[$NF] = 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); +} |