Commit 127245bb2d for openssl.org
commit 127245bb2dc1fcf53c5171e6d14d4e4d9a098b31
Author: Eugene Syromiatnikov <esyr@openssl.org>
Date: Tue Mar 31 06:00:59 2026 +0200
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 <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Apr 3 15:42:18 2026
(Merged from https://github.com/openssl/openssl/pull/30635)
diff --git a/util/checkplatformsyms.pl b/util/checkplatformsyms.pl
index 0ba8d333b2..f0ab62bdba 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);
}