diff mbox series

optionrom: pass -Wl,--no-error-rwx-segments

Message ID 8fbd4539809b41b4c5db0005d2bbde74765c4370.1740072090.git.sam@gentoo.org (mailing list archive)
State New
Headers show
Series optionrom: pass -Wl,--no-error-rwx-segments | expand

Commit Message

Sam James Feb. 20, 2025, 5:21 p.m. UTC
If GNU Binutils is configured with --enable-error-rwx-segments=yes, one
gets the following for optionrom:
```
.../bin/ld: error: pvh.img has a LOAD segment with RWX permissions
.../bin/ld: final link faile
```

Pass -Wl,--no-error-rwx-segments to suppress that.

Signed-off-by: Sam James <sam@gentoo.org>
---
 pc-bios/optionrom/Makefile | 1 +
 1 file changed, 1 insertion(+)


base-commit: 40efe733e10cc00e4fb4f9f5790a28e744e63c62
diff mbox series

Patch

diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
index 30d07026c7..4d3ce75af3 100644
--- a/pc-bios/optionrom/Makefile
+++ b/pc-bios/optionrom/Makefile
@@ -37,6 +37,7 @@  config-cc.mak: Makefile
 -include config-cc.mak
 
 override LDFLAGS = -nostdlib -Wl,--build-id=none,-T,$(SRC_DIR)/flat.lds
+override LDFLAGS += -Wl,--no-error-rwx-segments
 
 pvh.img: pvh.o pvh_main.o