From c1129ed0e270c851623af2ab817b375f1972ac43 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Wed, 3 Apr 2024 12:32:28 -0700 Subject: [PATCH] Add symbol imports file --- symbol-imports.txt | 7 +++++++ test_symbols.sh | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 symbol-imports.txt diff --git a/symbol-imports.txt b/symbol-imports.txt new file mode 100644 index 0000000..ab35c70 --- /dev/null +++ b/symbol-imports.txt @@ -0,0 +1,7 @@ +__stack_chk_fail@GLIBC_2.4 +__tls_get_addr@GLIBC_2.3 +abort@GLIBC_2.2.5 +free@GLIBC_2.2.5 +malloc@GLIBC_2.2.5 +memcpy@GLIBC_2.14 +memmove@GLIBC_2.2.5 diff --git a/test_symbols.sh b/test_symbols.sh index 117cd2c..f6c41e3 100755 --- a/test_symbols.sh +++ b/test_symbols.sh @@ -7,7 +7,7 @@ set -euo pipefail diff -u <(sort < "$2") <(nm "$1" | grep " T " | cut -f3 -d " " | sort) ec=0 for symbol in $(nm "$1" | grep " U " | sed 's/ U //') ; do - if ! grep "$symbol" "$3" > /dev/null ; then + if ! grep --fixed-strings "$symbol" "$3" > /dev/null ; then echo "Imported symbol $symbol not present in $3" ec=1 fi