From: Eugene Syromiatnikov Date: Tue, 31 Mar 2026 04:00:59 +0000 (+0200) Subject: util/checkplatformsyms.pl: do not exit after the first symbol X-Git-Tag: openssl-4.0.0~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3128dc03a5e354cbc94b05d158e1812c16d9768;p=thirdparty%2Fopenssl.git util/checkplatformsyms.pl: do not exit after the first symbol If there are several offending symbols, using the checker becomes quite tedious. Signed-off-by: Eugene Syromiatnikov Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz MergeDate: Fri Apr 3 15:42:18 2026 (Merged from https://github.com/openssl/openssl/pull/30635) (cherry picked from commit 127245bb2dc1fcf53c5171e6d14d4e4d9a098b31) --- diff --git a/util/checkplatformsyms.pl b/util/checkplatformsyms.pl index 0ba8d333b2a..f0ab62bdbac 100755 --- a/util/checkplatformsyms.pl +++ b/util/checkplatformsyms.pl @@ -62,13 +62,15 @@ if ($Config{osname} eq "MSWin32") { close($OBJFH); ($? >> 8 == 0) or die "Command '$cmd' has failed."; + my $ok = 1; foreach (@symlist) { + chomp; if (index($exps, $_) < 0) { print "Symbol $_ not in the allowed platform symbols list\n"; - exit 1; + $ok = 0; } } - exit 0; + exit !$ok; } else { $cmd = "objdump -t " . $objfilelist . " | grep UND | grep -v \@OPENSSL"; @@ -83,14 +85,16 @@ else { close($expsyms); open($OBJFH, "$cmd|") or die "Cannot open process: $!"; + my $ok = 1; while (<$OBJFH>) { + chomp; if (index($exps, $_) < 0) { print "Symbol $_ not in the allowed platform symbols list\n"; - exit 1; + $ok = 0; } } close($OBJFH); - exit $? >> 8; + exit !(!($? >> 8) || !$ok); }