diff options
author | Richard Levitte <levitte@openssl.org> | 2023-11-30 08:48:33 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2023-12-08 09:09:37 +0100 |
commit | 4f2bf52cf9a9af52c61d2402f3e31f7b97f1484d (patch) | |
tree | bd4042209d25e851243f23e6fe3d5e03b543ccc9 | |
parent | 9afa3c36ac723db0e2beebb794749be1016d8b9a (diff) |
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 <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22929)
(cherry picked from commit cef95c208fd5afcb98d21d2c63aaace5504f2842)
-rw-r--r-- | test/recipes/01-test_symbol_presence.t | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t index 5530ade0ad..8aaea51a88 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 |