mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-09 04:11:27 +08:00
3640654575
The previous approach uses readelf -DWs, which does not produce a stable output format (older binutils versions do not include symbol version information). This commit re-uses scripts/abilist.awk with a tweak to include GLIBC_PRIVATE symbols. This awk script is based on objdump -T output, which appears to be stable over time. Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
46 lines
897 B
Awk
46 lines
897 B
Awk
# This script processes the libc.so abilist (with GLIBC_PRIVATE
|
|
# symbols included). It checks for all the symbols used in td_symbol_list.
|
|
|
|
BEGIN {
|
|
%define DB_MAIN_VARIABLE(name) /* Nothing. */
|
|
%define DB_MAIN_SYMBOL(name) /* Nothing. */
|
|
%define DB_MAIN_ARRAY_VARIABLE(name) /* Nothing. */
|
|
%define DB_LOOKUP_NAME(idx, name) required[STRINGIFY (name)] = 1;
|
|
%define DB_LOOKUP_NAME_TH_UNIQUE(idx, name) th_unique[STRINGIFY (name)] = 1;
|
|
%include "db-symbols.h"
|
|
|
|
in_symtab = 0;
|
|
}
|
|
|
|
/^GLIBC_PRIVATE / {
|
|
seen[$2] = 1
|
|
}
|
|
|
|
END {
|
|
status = 0;
|
|
|
|
for (s in required) {
|
|
if (s in seen) print s, "ok";
|
|
else {
|
|
status = 1;
|
|
print s, "***MISSING***";
|
|
}
|
|
}
|
|
|
|
any = "";
|
|
for (s in th_unique) {
|
|
if (s in seen) {
|
|
any = s;
|
|
break;
|
|
}
|
|
}
|
|
if (any)
|
|
print "th_unique:", any;
|
|
else {
|
|
status = 1;
|
|
print "th_unique:", "***MISSING***";
|
|
}
|
|
|
|
exit(status);
|
|
}
|