diff options
author | Martin Storsjö <martin@martin.st> | 2022-03-09 13:02:43 +0300 |
---|---|---|
committer | Jean-Baptiste Kempf <jb@videolan.org> | 2022-03-10 17:49:23 +0300 |
commit | 28a9c46e1c36540d3276299f2e284ece1d2386be (patch) | |
tree | a1059d0cf2ef7183e5c39414044eafdef8fd252c | |
parent | 032aa1cb9b4b8bfada8510fec0227bec88970082 (diff) |
arm: Only produce the PAC/BTI .note section when targeting ELF
This avoids build errors if such features are enabled while targeting
another binary format. (Using such features on other platforms
might require some other form of signaling/setup though, but
the ELF specific .note section isn't applicable at least.)
-rw-r--r-- | src/arm/asm.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arm/asm.S b/src/arm/asm.S index e50001d..d1083c6 100644 --- a/src/arm/asm.S +++ b/src/arm/asm.S @@ -144,7 +144,7 @@ #endif /* !__ARM_FEATURE_PAC_DEFAULT */ -#if (GNU_PROPERTY_AARCH64_BTI != 0 || GNU_PROPERTY_AARCH64_PAC != 0) +#if (GNU_PROPERTY_AARCH64_BTI != 0 || GNU_PROPERTY_AARCH64_PAC != 0) && defined(__ELF__) .pushsection .note.gnu.property, "a" .balign 8 .long 4 @@ -156,7 +156,7 @@ .long (GNU_PROPERTY_AARCH64_BTI | GNU_PROPERTY_AARCH64_PAC) .long 0 .popsection -#endif /* GNU_PROPERTY_AARCH64_BTI != 0 || GNU_PROPERTY_AARCH64_PAC != 0 */ +#endif /* (GNU_PROPERTY_AARCH64_BTI != 0 || GNU_PROPERTY_AARCH64_PAC != 0) && defined(__ELF__) */ #endif /* ARCH_AARCH64 */ #if ARCH_ARM |