diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2022-08-06 11:16:29 +0100 |
---|---|---|
committer | Nigel Croxon <ncroxon@redhat.com> | 2022-08-08 11:35:10 -0400 |
commit | 803b49c40bb0b720b90d9c31d372911f1b946aa7 (patch) | |
tree | 9c8e9bb22bc576f07e19e19be3fce8461b4fc9ee /lib/mips64el | |
parent | 2ed6486834634130fe7bc9b8803b0113767fc7c1 (diff) | |
download | gnu-efi-803b49c40bb0b720b90d9c31d372911f1b946aa7.tar.gz |
*/*.S: add non-executable GNU stack marking on ELF-linux
binutils-2.39 enabed a few warning by default
(https://sourceware.org/pipermail/binutils/2022-August/122246.html):
> The ELF linker will now generate a warning message if the stack is made executable.
Let's suppress the warnings in assembly files by adding non-executables
stack markings. This fixes at least systemd build which uses '-Wl,--fatal-warnings':
https://github.com/systemd/systemd/issues/24226
Diffstat (limited to 'lib/mips64el')
-rw-r--r-- | lib/mips64el/efi_stub.S | 4 | ||||
-rw-r--r-- | lib/mips64el/setjmp.S | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/mips64el/efi_stub.S b/lib/mips64el/efi_stub.S index 464eae5..f84aaf2 100644 --- a/lib/mips64el/efi_stub.S +++ b/lib/mips64el/efi_stub.S @@ -1 +1,5 @@ /* This stub is a stub to make the build happy */ + +#if defined(__ELF__) && defined(__linux__) + .section .note.GNU-stack,"",%progbits +#endif diff --git a/lib/mips64el/setjmp.S b/lib/mips64el/setjmp.S index 930aca4..2b60cdb 100644 --- a/lib/mips64el/setjmp.S +++ b/lib/mips64el/setjmp.S @@ -90,3 +90,7 @@ longjmp: li $v0, 1 movn $v0, $a1, $a1 jr $ra + +#if defined(__ELF__) && defined(__linux__) + .section .note.GNU-stack,"",%progbits +#endif |