libffi: Include .note.GNU-stack on FreeBSD/x86
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_simplebootstrap_build--master-arm-bootstrap |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gcc_check--master-arm |
pending
|
Patch applied
|
| linaro-tcwg-bot/tcwg_simplebootstrap_build--master-aarch64-bootstrap |
pending
|
Patch applied
|
Commit Message
When testing a patch to enable libgo on FreeBSD/x86 (PR go/86535) with a
gcc configured to use GNU ld, the libffi tests FAILed:
Excess errors:
gld-2.46: warning: win64.o: missing .note.GNU-stack section implies executable stack
gld-2.46: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
This is fixed by upstream pull request
Include .note.GNU-stack on FreeBSD/x86
https://github.com/libffi/libffi/pull/991
Tested on amd64-pc-freebsd15.1.
Ok to cherry-pick into trunk?
Rainer
# HG changeset patch
# Parent 278e64c86a5f1c130a03d6e5b170feee4a0f51a3
libffi: Include .note.GNU-stack on FreeBSD/x86
@@ -1267,6 +1267,6 @@ L(EFDE9):
#endif /* ifdef __i386__ */
-#if defined __ELF__ && defined __linux__
+#if defined __ELF__ && (defined __linux__ || defined __FreeBSD__)
.section .note.GNU-stack,"",@progbits
#endif
@@ -990,7 +990,7 @@ L(EFDE9):
#endif /* ifndef _MSC_VER */
#endif /* ifndef __x86_64__ */
-#if defined __ELF__ && defined __linux__
+#if defined __ELF__ && (defined __linux__ || defined __FreeBSD__)
.section .note.GNU-stack,"",@progbits
#endif
#endif
@@ -706,6 +706,6 @@ L(EFDE5):
#endif
#endif /* __x86_64__ */
-#if defined __ELF__ && defined __linux__
+#if defined __ELF__ && (defined __linux__ || defined __FreeBSD__)
.section .note.GNU-stack,"",@progbits
#endif
@@ -249,6 +249,6 @@ C(ffi_closure_win64_alt):
#endif
#endif /* __x86_64__ */
-#if defined __ELF__ && defined __linux__
+#if defined __ELF__ && (defined __linux__ || defined __FreeBSD__)
.section .note.GNU-stack,"",@progbits
#endif
@@ -231,8 +231,8 @@ ffi_closure_win64_2 LABEL near
cfi_endproc
C(ffi_closure_win64) endp
-#if defined __ELF__ && defined __linux__
+#if defined __ELF__ && (defined __linux__ || defined __FreeBSD__)
.section .note.GNU-stack,"",@progbits
#endif
_text ends
-end
\ No newline at end of file
+end