1# This script processes the libc.so abilist (with GLIBC_PRIVATE
2# symbols included).  It checks for all the symbols used in td_symbol_list.
3
4BEGIN {
5%define DB_MAIN_VARIABLE(name) /* Nothing. */
6%define DB_MAIN_SYMBOL(name) /* Nothing. */
7%define DB_MAIN_ARRAY_VARIABLE(name) /* Nothing. */
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
15/^GLIBC_PRIVATE / {
16    seen[$2] = 1
17}
18
19END {
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}
46