From: Richard Levitte Date: Thu, 30 Nov 2023 07:48:33 +0000 (+0100) Subject: test/recipes/01-test_symbol_presence.t: Ignore symbols starting with '__' X-Git-Tag: openssl-3.0.13~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f2bf52cf9a9af52c61d2402f3e31f7b97f1484d;p=thirdparty%2Fopenssl.git test/recipes/01-test_symbol_presence.t: Ignore symbols starting with '__' On some platforms, the compiler may add symbols that aren't ours and that we should ignore. They are generally expected to start with a double underscore, and thereby easy to detect. (backport of commit 6c63b7e861819db439551b52ea5594faec04b65c) Reviewed-by: Matt Caswell Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/22929) (cherry picked from commit cef95c208fd5afcb98d21d2c63aaace5504f2842) --- diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t index 5530ade0add..8aaea51a889 100644 --- a/test/recipes/01-test_symbol_presence.t +++ b/test/recipes/01-test_symbol_presence.t @@ -80,7 +80,13 @@ foreach my $libname (@libnames) { # Return the result $_ } - grep(m|.* [BCDST] .*|, @nm_lines); + # Drop any symbol starting with a double underscore, they + # are reserved for the compiler / system ABI and are none + # of our business + grep !m|^__|, + # Only look at external definitions + grep m|.* [BCDST] .*|, + @nm_lines; # Massage the mkdef.pl output to only contain global symbols # The output we got is in Unix .map format, which has a global