summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2023-11-30 08:48:33 +0100
committerRichard Levitte <levitte@openssl.org>2023-12-08 09:07:35 +0100
commitcef95c208fd5afcb98d21d2c63aaace5504f2842 (patch)
tree742877692bfbc8444ad67c61ef3c8996ff4ee528 /test
parenta223bfcb89df54093a1858817e02fd6e0cb38219 (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)
Diffstat (limited to 'test')
-rw-r--r--test/recipes/01-test_symbol_presence.t8
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