Menu

#29 ld: warning: t.so has a LOAD segment with RWX permissions

v1.0_(example)
closed
None
5
2022-10-10
2022-08-13
Letu Ren
No

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!

Discussion

  • Nigel Croxon

    Nigel Croxon - 2022-09-26

    Send a patch and I will review it.

     
  • Letu Ren

    Letu Ren - 2022-10-10

    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.

     
  • Nigel Croxon

    Nigel Croxon - 2022-10-10
    • status: open --> closed
    • assigned_to: Nigel Croxon
     
  • Nigel Croxon

    Nigel Croxon - 2022-10-10

    commit 98f1250742bbe3d91a7aaf5d66cc2cb4bdb3c0dd
    Author: Letu Ren fantasquex@gmail.com
    Date: Mon Oct 10 10:40:04 2022 +0200
    riscv: Fix ld RWX warning

     

Log in to post a comment.