Fix memory leak in dlopen with RTLD_NOLOAD.
[glibc.git] / nptl_db / db-symbols.awk
blobf9a91b93bfd66dff8d3ecffc0b6997b471279a88
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.
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"
9 in_symtab = 0;
12 /Symbol table '.symtab'/ { in_symtab=1; next }
13 NF == 0 { in_symtab=0; next }
15 !in_symtab { next }
17 NF >= 8 && $7 != "UND" { seen[$NF] = 1 }
19 END {
20 status = 0;
22 for (s in required) {
23 if (s in seen) print s, "ok";
24 else {
25 status = 1;
26 print s, "***MISSING***";
30 any = "";
31 for (s in th_unique) {
32 if (s in seen) {
33 any = s;
34 break;
37 if (any)
38 print "th_unique:", any;
39 else {
40 status = 1;
41 print "th_unique:", "***MISSING***";
44 exit(status);