[Gnu-efi-discuss] [PATCH] Mark stack for crt0 objects as non-executable
Brought to you by:
noxorc
|
From: Jan K. <jan...@si...> - 2022-07-23 15:57:20
|
From: Jan Kiszka <jan...@si...> There is no reason why the stack should need to be executable, and recent binutils start to complain about that loudly, see https://sourceforge.net/p/gnu-efi/bugs/28 Signed-off-by: Jan Kiszka <jan...@si...> --- gnuefi/crt0-efi-aarch64.S | 2 ++ gnuefi/crt0-efi-arm.S | 2 ++ gnuefi/crt0-efi-ia32.S | 2 ++ gnuefi/crt0-efi-ia64.S | 3 +++ gnuefi/crt0-efi-mips64el.S | 2 ++ gnuefi/crt0-efi-riscv64.S | 2 ++ gnuefi/crt0-efi-x86_64.S | 3 +++ 7 files changed, 16 insertions(+) diff --git a/gnuefi/crt0-efi-aarch64.S b/gnuefi/crt0-efi-aarch64.S index d50e78d..2653747 100644 --- a/gnuefi/crt0-efi-aarch64.S +++ b/gnuefi/crt0-efi-aarch64.S @@ -16,6 +16,8 @@ * either version 2 of the License, or (at your option) any later version. */ + .section .note.GNU-stack,"",%progbits + .section .text.head /* diff --git a/gnuefi/crt0-efi-arm.S b/gnuefi/crt0-efi-arm.S index e7e5905..538a802 100644 --- a/gnuefi/crt0-efi-arm.S +++ b/gnuefi/crt0-efi-arm.S @@ -16,6 +16,8 @@ * either version 2 of the License, or (at your option) any later version. */ + .section .note.GNU-stack,"",%progbits + .section .text.head /* diff --git a/gnuefi/crt0-efi-ia32.S b/gnuefi/crt0-efi-ia32.S index b1c9610..aca07ef 100644 --- a/gnuefi/crt0-efi-ia32.S +++ b/gnuefi/crt0-efi-ia32.S @@ -33,6 +33,8 @@ SUCH DAMAGE. */ + .section .note.GNU-stack,"",%progbits + .text .align 4 diff --git a/gnuefi/crt0-efi-ia64.S b/gnuefi/crt0-efi-ia64.S index cd00b8d..885d556 100644 --- a/gnuefi/crt0-efi-ia64.S +++ b/gnuefi/crt0-efi-ia64.S @@ -32,6 +32,9 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + + .section .note.GNU-stack,"",%progbits + .text .psr abi64 .psr lsb diff --git a/gnuefi/crt0-efi-mips64el.S b/gnuefi/crt0-efi-mips64el.S index 6d26f66..9158c04 100644 --- a/gnuefi/crt0-efi-mips64el.S +++ b/gnuefi/crt0-efi-mips64el.S @@ -17,6 +17,8 @@ * either version 2 of the License, or (at your option) any later version. */ + .section .note.GNU-stack,"",%progbits + .section .text.head /* diff --git a/gnuefi/crt0-efi-riscv64.S b/gnuefi/crt0-efi-riscv64.S index 1bc536b..97c975b 100644 --- a/gnuefi/crt0-efi-riscv64.S +++ b/gnuefi/crt0-efi-riscv64.S @@ -20,6 +20,8 @@ #define EFI_SUBSYSTEM 10 #endif + .section .note.GNU-stack,"",%progbits + .section .text.head /* diff --git a/gnuefi/crt0-efi-x86_64.S b/gnuefi/crt0-efi-x86_64.S index 20bbaee..052c4b0 100644 --- a/gnuefi/crt0-efi-x86_64.S +++ b/gnuefi/crt0-efi-x86_64.S @@ -34,6 +34,9 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + + .section .note.GNU-stack,"",%progbits + .text .align 4 -- 2.35.3 |