Fix handling of the "0:" label in arm-xlate.pl
authorTom Cosgrove <tom.cosgrove@arm.com>
Thu, 3 Aug 2023 18:43:17 +0000 (19:43 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 8 Aug 2023 20:36:23 +0000 (22:36 +0200)
commit5079d2d25cfe6a02e04c718c8a5d8d83f26126b9
tree09169bdf541db23d36339c24e32e408e498ecb9b
parent42f32b460646d8d4ef1e8927ec976716f02a093a
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)

(cherry picked from commit 9607f5ccf285ac9988a86f95c5ad9f92b556a843)
crypto/perlasm/arm-xlate.pl