From: Tom Cosgrove Date: Thu, 3 Aug 2023 18:43:17 +0000 (+0100) Subject: Fix handling of the "0:" label in arm-xlate.pl X-Git-Tag: openssl-3.2.0-alpha1~262 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9607f5ccf285ac9988a86f95c5ad9f92b556a843;p=thirdparty%2Fopenssl.git Fix handling of the "0:" label in arm-xlate.pl When $label == "0", $label is not truthy, so `if ($label)` thinks there isn't a label. Correct this by looking at the result of the s/// command. Verified that there are no changes in the .S files created during a normal build, and that the "0:" labels appear in the translation given in the error report (and they are the only difference in the before and after output). Fixes #21647 Change-Id: I5f2440100c62360bf4bdb7c7ece8dddd32553c79 Reviewed-by: Paul Dale Reviewed-by: Shane Lontis Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/21653) --- diff --git a/crypto/perlasm/arm-xlate.pl b/crypto/perlasm/arm-xlate.pl index 4d1e8874140..b9b56463b2a 100755 --- a/crypto/perlasm/arm-xlate.pl +++ b/crypto/perlasm/arm-xlate.pl @@ -170,9 +170,8 @@ while(my $line=<>) { } { - $line =~ s|(^[\.\w]+)\:\s*||; - my $label = $1; - if ($label) { + if ($line =~ s|(^[\.\w]+)\:\s*||) { + my $label = $1; printf "%s:",($GLOBALS{$label} or $label); } }