From 6c63b7e861819db439551b52ea5594faec04b65c Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 30 Nov 2023 08:48:33 +0100 Subject: [PATCH] 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. Fixes #22869 (partially) Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/22880) --- test/recipes/01-test_symbol_presence.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/recipes/01-test_symbol_presence.t b/test/recipes/01-test_symbol_presence.t index 9efa9f8d2d6..66e5669e193 100644 --- a/test/recipes/01-test_symbol_presence.t +++ b/test/recipes/01-test_symbol_presence.t @@ -124,7 +124,13 @@ foreach (sort keys %stlibname) { # Return the result $_ } - grep(m|.* [BCDST] .*|, @$_); + # 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] .*|, + @$_ ), } # Massage the mkdef.pl output to only contain global symbols -- 2.47.2