diff mbox series

[3/6] aarch64: Fix noexecstack note in libitm

Message ID c3d9cfc475ee35d4e488964ef7d7f7c6f36af720.1594224951.git.szabolcs.nagy@arm.com
State New
Headers show
Series aarch64: Fix target libraries for BTI [PR96001] | expand

Commit Message

Szabolcs Nagy July 8, 2020, 4:27 p.m. UTC
sjlj.S only had the note on Linux, but it is supposed
to have it on FreeBSD too.

libitm/ChangeLog:

2020-07-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* config/aarch64/sjlj.S: Add stack note if __FreeBSD__ is defined.

---
Note: this is a minor change to make the asm consistent with
gcc code generation (which emits the note on freebsd too).
the linker defaults to noexecstack on aarch64 so this should
not matter much in practice.
---
 libitm/config/aarch64/sjlj.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kyrylo Tkachov July 8, 2020, 4:43 p.m. UTC | #1
> -----Original Message-----
> From: Szabolcs Nagy <Szabolcs.Nagy@arm.com>
> Sent: 08 July 2020 17:27
> To: gcc-patches@gcc.gnu.org
> Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>; Kyrylo Tkachov
> <Kyrylo.Tkachov@arm.com>
> Subject: [PATCH 3/6] aarch64: Fix noexecstack note in libitm
> 
> sjlj.S only had the note on Linux, but it is supposed
> to have it on FreeBSD too.
> 

Ok.
Thanks,
Kyrill

> libitm/ChangeLog:
> 
> 2020-07-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
> 
> 	* config/aarch64/sjlj.S: Add stack note if __FreeBSD__ is defined.
> 
> ---
> Note: this is a minor change to make the asm consistent with
> gcc code generation (which emits the note on freebsd too).
> the linker defaults to noexecstack on aarch64 so this should
> not matter much in practice.
> ---
>  libitm/config/aarch64/sjlj.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libitm/config/aarch64/sjlj.S b/libitm/config/aarch64/sjlj.S
> index 27626c1f378..5b97b973e27 100644
> --- a/libitm/config/aarch64/sjlj.S
> +++ b/libitm/config/aarch64/sjlj.S
> @@ -87,6 +87,6 @@ GTM_longjmp:
>  	cfi_endproc
>  	.size	GTM_longjmp, . - GTM_longjmp
> 
> -#ifdef __linux__
> +#if defined(__linux__) || defined(__FreeBSD__)
>  .section .note.GNU-stack, "", %progbits
>  #endif
> --
> 2.17.1
diff mbox series

Patch

diff --git a/libitm/config/aarch64/sjlj.S b/libitm/config/aarch64/sjlj.S
index 27626c1f378..5b97b973e27 100644
--- a/libitm/config/aarch64/sjlj.S
+++ b/libitm/config/aarch64/sjlj.S
@@ -87,6 +87,6 @@  GTM_longjmp:
 	cfi_endproc
 	.size	GTM_longjmp, . - GTM_longjmp
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
 .section .note.GNU-stack, "", %progbits
 #endif