diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2023-04-24 13:55:48 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-05-02 11:17:09 +0200 |
commit | f5d6ae54b31b5832c67bf38d5457021856c207c2 (patch) | |
tree | 7de305f153a32f8c2e0e42fcccdbecc7ec2a1e6d /lib | |
parent | 265030bba41f44423b69ea853a3407cd4009d68c (diff) | |
download | barebox-f5d6ae54b31b5832c67bf38d5457021856c207c2.tar.gz |
treewide: use non-executable stack annotations for blobs
We are building the non-sandbox platforms with -z noexecstack, because
the ELF section attributes don't matter. This is different for sandbox,
where we compile assembly files directly only for embedding blobs.
This currently yields a build warning:
binutils-2.39/bin/ld: warning: defaultenv/defaultenv-2-reboot-mode.bbenv.gz.o:
missing .note.GNU-stack section implies executable stack
binutils-2.39/bin/ld: NOTE: This behaviour is deprecated and will be removed
in a future version of the linker
Let's add the non-executable stack annotations, so sandbox may run with
non-executable stack. This way we are left with a single linker
warning that needs to be resolved:
binutils-2.39/bin/ld: warning: barebox has a LOAD segment with RWX permissions
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Link: https://lore.barebox.org/20230424115548.114858-2-ahmad@a3f.at
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/logo/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/logo/Makefile b/lib/logo/Makefile index 382701fb36..9c14105e88 100644 --- a/lib/logo/Makefile +++ b/lib/logo/Makefile @@ -26,6 +26,7 @@ quiet_cmd_logo_S = LOGO.S $@ cmd_logo_S = \ ( \ echo '\#include <asm/barebox.lds.h>'; \ + echo '.section .note.GNU-stack,"",%progbits'; \ echo '.section .bblogo.rodata.$(subst -,_,$(*F)),"a"'; \ echo '.balign STRUCT_ALIGNMENT'; \ echo '.global __bblogo_$(subst -,_,$(*F))_start'; \ |