ld: warning: t.so has a LOAD segment with RWX permissions
Brought to you by:
noxorc
Hi, I'm trying to build gnu-efi on ArchLinux RISCV with binutils 2.39. And I met a build error when executing make -C apps
. Logs are listed below.
ld -nostdlib --warn-common --no-undefined --fatal-warnings --build-id=sha1 -shared -Bsymbolic -L../lib -L../gnuefi ../gnuefi/crt0-efi-riscv64.o --defsym=EFI_SUBSYSTEM=0xa t.o -o t.so -lefi -lgnuefi /usr/lib/gcc/riscv64-unknown-linux-gnu/12.1.1/libgcc.a -T ./../gnuefi/elf_riscv64_efi.lds
ld: warning: t.so has a LOAD segment with RWX permissions
make: *** [../Make.rules:49: t.so] Error 1
make: *** Waiting for unfinished jobs....
I can successfully build gnu-efi with an extra LDFLAGS --no-warn-rwx-segments
. This solution is found in here. I'm not sure whether it is intended. I wonder whether it will be fixed as well.
Thank you!
Send a patch and I will review it.
Hi, I have submitted a patch at https://sourceforge.net/p/gnu-efi/code/merge-requests/31/. Could you please review it if you have time? Thanks a lot.
commit 98f1250742bbe3d91a7aaf5d66cc2cb4bdb3c0dd
Author: Letu Ren fantasquex@gmail.com
Date: Mon Oct 10 10:40:04 2022 +0200
riscv: Fix ld RWX warning