diff options
author | Tom Cosgrove <tom.cosgrove@arm.com> | 2023-08-03 19:43:17 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-08-08 22:35:53 +0200 |
commit | 9607f5ccf285ac9988a86f95c5ad9f92b556a843 (patch) | |
tree | 41a5a9b1edba22b4ffdb7aefd8e45eddd304b143 /crypto/perlasm/arm-xlate.pl | |
parent | ec34c887d1fea79001490e65342201a78514667e (diff) |
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 <pauli@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21653)
Diffstat (limited to 'crypto/perlasm/arm-xlate.pl')
-rwxr-xr-x | crypto/perlasm/arm-xlate.pl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/perlasm/arm-xlate.pl b/crypto/perlasm/arm-xlate.pl index 4d1e887414..b9b56463b2 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); } } |