From 69f6399c3733d717bc3dcefda7fcc031f06cef0d Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 22 Nov 2022 08:36:40 -0800 Subject: [PATCH] libsa: Add missing GNU-stack annotations to _setjmp.S. ld.bfd marks the stack as executable for the crt objects due to the missing annotations which raises a fatal warning starting with version 2.39. --- stand/libsa/amd64/_setjmp.S | 2 ++ stand/libsa/i386/_setjmp.S | 2 ++ stand/libsa/powerpc/_setjmp.S | 2 ++ 3 files changed, 6 insertions(+) diff --git a/stand/libsa/amd64/_setjmp.S b/stand/libsa/amd64/_setjmp.S index 53ea6e9b5d5..38f27dc1968 100644 --- a/stand/libsa/amd64/_setjmp.S +++ b/stand/libsa/amd64/_setjmp.S @@ -90,3 +90,5 @@ ENTRY(_longjmp) 1: movq %rcx,0(%rsp) ret END(_longjmp) + + .section .note.GNU-stack,"",%progbits diff --git a/stand/libsa/i386/_setjmp.S b/stand/libsa/i386/_setjmp.S index 95b0ea8037f..5766b25816a 100644 --- a/stand/libsa/i386/_setjmp.S +++ b/stand/libsa/i386/_setjmp.S @@ -75,3 +75,5 @@ ENTRY(_longjmp) 1: movl %ecx,0(%esp) ret END(_longjmp) + + .section .note.GNU-stack,"",%progbits diff --git a/stand/libsa/powerpc/_setjmp.S b/stand/libsa/powerpc/_setjmp.S index 485050f003a..c36f2e6a6b8 100644 --- a/stand/libsa/powerpc/_setjmp.S +++ b/stand/libsa/powerpc/_setjmp.S @@ -115,3 +115,5 @@ ASENTRY_NOPROF(_longjmp) mr 3, 4 blr ASEND(_longjmp) + + .section .note.GNU-stack,"",%progbits