about summary refs log tree commit diff
path: root/nptl_db/Makefile
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-06-29 22:17:05 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-06-29 22:17:08 +0200
commit3640654575bef7b56840fbadc1a6d6180ea011a7 (patch)
tree22e94076681604c7264d99394ce655ecf9c87a38 /nptl_db/Makefile
parent9dc7dc5708c5c35aeb2e0c594c74b4ba4674aa6d (diff)
downloadglibc-3640654575bef7b56840fbadc1a6d6180ea011a7.tar.gz
glibc-3640654575bef7b56840fbadc1a6d6180ea011a7.tar.xz
glibc-3640654575bef7b56840fbadc1a6d6180ea011a7.zip
nptl_db: Re-use the ELF-to-abilist converter for ABI checking
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>
Diffstat (limited to 'nptl_db/Makefile')
-rw-r--r--nptl_db/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/nptl_db/Makefile b/nptl_db/Makefile
index c04aa6140a..8ad4f90e84 100644
--- a/nptl_db/Makefile
+++ b/nptl_db/Makefile
@@ -54,8 +54,13 @@ tests-special += $(objpfx)db-symbols.out
 include ../Rules
 
 $(objpfx)db-symbols.out: $(objpfx)db-symbols.v.i \
-			 $(common-objpfx)libc.so
-	LC_ALL=C $(READELF) -W -D -s $(filter %.so,$^) | $(AWK) -f $< > $@; \
+			 $(objpfx)libc.symlist-private
+	LC_ALL=C $(AWK) -f $^ > $@; \
 	$(evaluate-test)
 
 $(objpfx)db-symbols.v.i: db-symbols.awk
+
+$(objpfx)libc.symlist-private: $(..)scripts/abilist.awk \
+  $(common-objpfx)libc.dynsym
+	LC_ALL=C $(AWK) -v include_private=1 -f $^ > $@T
+	mv -f $@T $@