Last active
September 18, 2023 09:57
-
-
Save jaygooby/eb29c5220a4ba06b8c800b9e06259092 to your computer and use it in GitHub Desktop.
Patch for openssl-1.0.2u on aarch64 to avoid the `relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC` error when linking. See https://jay.gooby.org/2023/09/15/patch-for-aarch64-aka-arm64-openssl-1-0-2-relocation-r-aarch64-prel64-against-symbol-…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/crypto/sha/asm/sha1-armv8.pl | |
+++ b/crypto/sha/asm/sha1-armv8.pl | |
@@ -303,7 +303,7 @@ $code.=<<___; | |
.quad OPENSSL_armcap_P-. | |
.asciz "SHA1 block transform for ARMv8, CRYPTOGAMS by <appro\@openssl.org>" | |
.align 2 | |
-.comm OPENSSL_armcap_P,4,4 | |
+.hidden OPENSSL_armcap_P | |
___ | |
}}} | |
diff --git a/crypto/sha/asm/sha512-armv8.pl b/crypto/sha/asm/sha512-armv8.pl | |
index f7b36b986a..5e83e56385 100644 | |
--- a/crypto/sha/asm/sha512-armv8.pl | |
+++ b/crypto/sha/asm/sha512-armv8.pl | |
@@ -389,7 +389,7 @@ ___ | |
} | |
$code.=<<___; | |
-.comm OPENSSL_armcap_P,4,4 | |
+.hidden OPENSSL_armcap_P | |
___ | |
{ my %opcode = ( | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment