diff --git a/gnu-efi-add-GNU-stack-section.patch b/gnu-efi-add-GNU-stack-section.patch new file mode 100644 index 0000000..164a0f3 --- /dev/null +++ b/gnu-efi-add-GNU-stack-section.patch @@ -0,0 +1,69 @@ +diff --git a/gnuefi/crt0-efi-aarch64.S b/gnuefi/crt0-efi-aarch64.S +index d50e78d..f1c0155 100644 +--- a/gnuefi/crt0-efi-aarch64.S ++++ b/gnuefi/crt0-efi-aarch64.S +@@ -128,3 +128,5 @@ _start: + + 0: ldp x29, x30, [sp], #32 + ret ++ ++ .section .note.GNU-stack,"",%progbits +diff --git a/gnuefi/crt0-efi-arm.S b/gnuefi/crt0-efi-arm.S +index e7e5905..731eda6 100644 +--- a/gnuefi/crt0-efi-arm.S ++++ b/gnuefi/crt0-efi-arm.S +@@ -143,3 +143,5 @@ _start: + + .L_DYNAMIC: + .word _DYNAMIC - . ++ ++ .section .note.GNU-stack,"",%progbits +diff --git a/gnuefi/crt0-efi-ia32.S b/gnuefi/crt0-efi-ia32.S +index b1c9610..72b06a7 100644 +--- a/gnuefi/crt0-efi-ia32.S ++++ b/gnuefi/crt0-efi-ia32.S +@@ -75,3 +75,5 @@ dummy: .long 0 + .long 12 // Block Size (2*4+2*2), must be aligned by 32 Bits + .word (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy + .word (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy ++ ++ .section .note.GNU-stack,"",@progbits +diff --git a/gnuefi/crt0-efi-ia64.S b/gnuefi/crt0-efi-ia64.S +index cd00b8d..e80da96 100644 +--- a/gnuefi/crt0-efi-ia64.S ++++ b/gnuefi/crt0-efi-ia64.S +@@ -85,3 +85,5 @@ _start_plabel: + data4 12 // Block Size (2*4+2*2), must be aligned by 32 Bits + data2 (IMAGE_REL_BASED_DIR64<<12) + 0 // reloc for plabel's entry point + data2 (IMAGE_REL_BASED_DIR64<<12) + 8 // reloc for plabel's global pointer ++ ++ .section .note.GNU-stack,"",@progbits +diff --git a/gnuefi/crt0-efi-mips64el.S b/gnuefi/crt0-efi-mips64el.S +index 6d26f66..527f5ce 100644 +--- a/gnuefi/crt0-efi-mips64el.S ++++ b/gnuefi/crt0-efi-mips64el.S +@@ -186,3 +186,5 @@ _pc: + .end _start + + .set pop ++ ++ .section .note.GNU-stack,"",@progbits +diff --git a/gnuefi/crt0-efi-riscv64.S b/gnuefi/crt0-efi-riscv64.S +index 1bc536b..363f280 100644 +--- a/gnuefi/crt0-efi-riscv64.S ++++ b/gnuefi/crt0-efi-riscv64.S +@@ -134,3 +134,5 @@ _start: + ld ra, 16(sp) + 0: addi sp, sp, 24 + ret ++ ++ .section .note.GNU-stack,"",@progbits +diff --git a/gnuefi/crt0-efi-x86_64.S b/gnuefi/crt0-efi-x86_64.S +index 20bbaee..d8ea85e 100644 +--- a/gnuefi/crt0-efi-x86_64.S ++++ b/gnuefi/crt0-efi-x86_64.S +@@ -75,3 +75,4 @@ label1: + .word (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy + .word (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy + ++ .section .note.GNU-stack,"",@progbits diff --git a/gnu-efi.changes b/gnu-efi.changes index eb3a55e..3af13dc 100644 --- a/gnu-efi.changes +++ b/gnu-efi.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue May 3 13:35:13 UTC 2022 - Martin Liška + +- Add gnu-efi-add-GNU-stack-section.patch in order to add .note.GNU-stack + sections, fixes upstream issue: + https://sourceforge.net/p/gnu-efi/bugs/28/ + ------------------------------------------------------------------- Mon Oct 18 09:57:26 UTC 2021 - Andreas Schwab diff --git a/gnu-efi.spec b/gnu-efi.spec index 2e8e41e..04354ea 100644 --- a/gnu-efi.spec +++ b/gnu-efi.spec @@ -1,7 +1,7 @@ # # spec file for package gnu-efi # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,7 @@ URL: https://sourceforge.net/projects/gnu-efi Source: https://download.sourceforge.net/project/gnu-efi/gnu-efi-%{version}.tar.bz2 Source1: %{name}-rpmlintrc Patch1: gnu-efi-bsc1182057-support-sbat-section.patch +Patch2: gnu-efi-add-GNU-stack-section.patch BuildRequires: kernel-source ExclusiveArch: ia64 %{ix86} x86_64 aarch64 %{arm} riscv64 @@ -37,6 +38,7 @@ environment. %prep %setup -q %patch1 -p1 +%patch2 -p1 %build ##########################