]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
test/recipes/01-test_symbol_presence.t: Ignore symbols starting with '__'
authorRichard Levitte <levitte@openssl.org>
Thu, 30 Nov 2023 07:48:33 +0000 (08:48 +0100)
committerRichard Levitte <levitte@openssl.org>
Mon, 4 Dec 2023 08:55:15 +0000 (09:55 +0100)
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 <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22880)

test/recipes/01-test_symbol_presence.t

index 9efa9f8d2d6eb7a785a7edc5c8ab653164672cbc..66e5669e193c7291671c50373c47e0f9b2ba9f4a 100644 (file)
@@ -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