]> git.ipfire.org Git - thirdparty/glibc.git/blob - nptl_db/db-symbols.awk
Update copyright notices with scripts/update-copyrights.
[thirdparty/glibc.git] / nptl_db / db-symbols.awk
1 # This script processes the output of 'readelf -W -s' on the libpthread.so
2 # we've just built. It checks for all the symbols used in td_symbol_list.
3
4 BEGIN {
5 %define DB_LOOKUP_NAME(idx, name) required[STRINGIFY (name)] = 1;
6 %define DB_LOOKUP_NAME_TH_UNIQUE(idx, name) th_unique[STRINGIFY (name)] = 1;
7 %include "db-symbols.h"
8
9 in_symtab = 0;
10 }
11
12 /Symbol table '.symtab'/ { in_symtab=1; next }
13 NF == 0 { in_symtab=0; next }
14
15 !in_symtab { next }
16
17 NF >= 8 && $7 != "UND" { seen[$NF] = 1 }
18
19 END {
20 status = 0;
21
22 for (s in required) {
23 if (s in seen) print s, "ok";
24 else {
25 status = 1;
26 print s, "***MISSING***";
27 }
28 }
29
30 any = "";
31 for (s in th_unique) {
32 if (s in seen) {
33 any = s;
34 break;
35 }
36 }
37 if (any)
38 print "th_unique:", any;
39 else {
40 status = 1;
41 print "th_unique:", "***MISSING***";
42 }
43
44 exit(status);
45 }