db-symbols.awk 897 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. BEGIN {
  4. %define DB_MAIN_VARIABLE(name) /* Nothing. */
  5. %define DB_MAIN_SYMBOL(name) /* Nothing. */
  6. %define DB_MAIN_ARRAY_VARIABLE(name) /* Nothing. */
  7. %define DB_LOOKUP_NAME(idx, name) required[STRINGIFY (name)] = 1;
  8. %define DB_LOOKUP_NAME_TH_UNIQUE(idx, name) th_unique[STRINGIFY (name)] = 1;
  9. %include "db-symbols.h"
  10. in_symtab = 0;
  11. }
  12. /^GLIBC_PRIVATE / {
  13. seen[$2] = 1
  14. }
  15. END {
  16. status = 0;
  17. for (s in required) {
  18. if (s in seen) print s, "ok";
  19. else {
  20. status = 1;
  21. print s, "***MISSING***";
  22. }
  23. }
  24. any = "";
  25. for (s in th_unique) {
  26. if (s in seen) {
  27. any = s;
  28. break;
  29. }
  30. }
  31. if (any)
  32. print "th_unique:", any;
  33. else {
  34. status = 1;
  35. print "th_unique:", "***MISSING***";
  36. }
  37. exit(status);
  38. }