diff options
author | Tom Cosgrove <tom.cosgrove@arm.com> | 2023-08-29 21:38:11 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2023-08-29 21:38:11 +0000 |
commit | eba6abafc1988dc8753b08822abff333d4810e75 (patch) | |
tree | 81901025be3c90dde8a9deb3c78e56e46249a954 /crypto | |
parent | 1b10bdf0e2fa80a485980b783469687623d3f1c3 (diff) | |
download | src-eba6abafc1988dc8753b08822abff333d4810e75.tar.gz src-eba6abafc1988dc8753b08822abff333d4810e75.zip |
OpenSSL: 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).
Obtained from: OpenSSL commit 9607f5ccf285ac9988a86f95c5ad9f92b556a843
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D41587
Diffstat (limited to 'crypto')
-rwxr-xr-x | crypto/openssl/crypto/perlasm/arm-xlate.pl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/openssl/crypto/perlasm/arm-xlate.pl b/crypto/openssl/crypto/perlasm/arm-xlate.pl index a90885905c0f..57b75c4e5dad 100755 --- a/crypto/openssl/crypto/perlasm/arm-xlate.pl +++ b/crypto/openssl/crypto/perlasm/arm-xlate.pl @@ -159,9 +159,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); } } |