diff mbox series

[FFmpeg-devel] aarch64: Only emit the PAC/BTI note section when targeting ELF

Message ID 20220309131428.52375-1-martin@martin.st
State Accepted
Commit c3fea6d83be43198060f2dc577fd642290966537
Headers show
Series [FFmpeg-devel] aarch64: Only emit the PAC/BTI note section when targeting ELF | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished

Commit Message

Martin Storsjö March 9, 2022, 1:14 p.m. UTC
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.)

Signed-off-by: Martin Storsjö <martin@martin.st>
---
 libavutil/aarch64/asm.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin Storsjö March 14, 2022, 10:45 p.m. UTC | #1
On Wed, 9 Mar 2022, Martin Storsjö wrote:

> 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.)
>
> Signed-off-by: Martin Storsjö <martin@martin.st>
> ---
> libavutil/aarch64/asm.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavutil/aarch64/asm.S b/libavutil/aarch64/asm.S
> index b817eaab22..a7782415d7 100644
> --- a/libavutil/aarch64/asm.S
> +++ b/libavutil/aarch64/asm.S
> @@ -141,7 +141,7 @@
> #endif
>
>
> -#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
> -- 
> 2.32.0 (Apple Git-132)

Pushed.

// Martin
diff mbox series

Patch

diff --git a/libavutil/aarch64/asm.S b/libavutil/aarch64/asm.S
index b817eaab22..a7782415d7 100644
--- a/libavutil/aarch64/asm.S
+++ b/libavutil/aarch64/asm.S
@@ -141,7 +141,7 @@ 
 #endif
 
 
-#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