[PATCH master] sandbox: lds: fix "ELF has a LOAD segment with RWX permissions" warning
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Jul 3 12:02:26 PDT 2024
With binutils 2.39+, the barebox build started emitting this warning.
On platforms other than sandbox, we disable this warning by passing --no-warn-rwx
to ld as we don't care for ELF attributes as they aren't used anyway.
On sandbox, however, the ELF attributes matter, so disabling the warning
completely felt wrong. Looking more into it now, we can mark the
.barebox_rodata section in the linker file snippet we have in sandbox as
READONLY and the warning disappears, so let's do that instead.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
arch/sandbox/board/barebox.lds.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sandbox/board/barebox.lds.S b/arch/sandbox/board/barebox.lds.S
index ab2801f3d207..de8552dba0ac 100644
--- a/arch/sandbox/board/barebox.lds.S
+++ b/arch/sandbox/board/barebox.lds.S
@@ -5,7 +5,7 @@
SECTIONS
{
. = ALIGN(64);
- .barebox_rodata : {
+ .barebox_rodata (READONLY) : {
RO_DATA_SECTION
}
}
--
2.39.2
More information about the barebox
mailing list