]>
Commit | Line | Data |
---|---|---|
fef400a2 | 1 | # This script processes the output of 'readelf -W -D -s' on the libc.so |
e965d514 RM |
2 | # we've just built. It checks for all the symbols used in td_symbol_list. |
3 | ||
4 | BEGIN { | |
f8aeae34 | 5 | %define DB_MAIN_VARIABLE(name) /* Nothing. */ |
23ce1cf3 | 6 | %define DB_MAIN_SYMBOL(name) /* Nothing. */ |
7a7229de | 7 | %define DB_MAIN_ARRAY_VARIABLE(name) /* Nothing. */ |
e965d514 RM |
8 | %define DB_LOOKUP_NAME(idx, name) required[STRINGIFY (name)] = 1; |
9 | %define DB_LOOKUP_NAME_TH_UNIQUE(idx, name) th_unique[STRINGIFY (name)] = 1; | |
10 | %include "db-symbols.h" | |
11 | ||
12 | in_symtab = 0; | |
13 | } | |
14 | ||
fef400a2 | 15 | /Symbol table for image/ { in_symtab=1; next } |
e965d514 RM |
16 | NF == 0 { in_symtab=0; next } |
17 | ||
18 | !in_symtab { next } | |
19 | ||
8ee84bd0 | 20 | NF >= 8 && $7 != "UND" { seen[$NF] = 1 } |
e965d514 RM |
21 | |
22 | END { | |
23 | status = 0; | |
24 | ||
25 | for (s in required) { | |
fef400a2 | 26 | s = s "@@GLIBC_PRIVATE" |
e965d514 RM |
27 | if (s in seen) print s, "ok"; |
28 | else { | |
29 | status = 1; | |
30 | print s, "***MISSING***"; | |
31 | } | |
32 | } | |
33 | ||
34 | any = ""; | |
35 | for (s in th_unique) { | |
fef400a2 | 36 | s = s "@@GLIBC_PRIVATE" |
e965d514 RM |
37 | if (s in seen) { |
38 | any = s; | |
39 | break; | |
40 | } | |
41 | } | |
42 | if (any) | |
43 | print "th_unique:", any; | |
44 | else { | |
45 | status = 1; | |
46 | print "th_unique:", "***MISSING***"; | |
47 | } | |
48 | ||
49 | exit(status); | |
50 | } |