From c3be2cd9104c5661b1ee0e10bff6899fdfc66e7a Mon Sep 17 00:00:00 2001 From: Xiaotian Wu Date: Thu, 18 May 2023 19:53:25 +0800 Subject: [PATCH] *.efi.lds: Use proper data segment placement Use ld commands DATA_SEGMENT_ALIGN and DATA_SEGMENT_END Fixes binutils 2.39 warning: /usr/bin/ld: warning: efi/fwup.so has a LOAD segment with RWX permissions --- gnuefi/elf_loongarch64_efi.lds | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnuefi/elf_loongarch64_efi.lds b/gnuefi/elf_loongarch64_efi.lds index f7c45c7..fccfe77 100644 --- a/gnuefi/elf_loongarch64_efi.lds +++ b/gnuefi/elf_loongarch64_efi.lds @@ -53,7 +53,9 @@ SECTIONS . = ALIGN(4096); .dynstr : { *(.dynstr) } . = ALIGN(4096); - .note.gnu.build-id : { *(.note.gnu.build-id) } + .note.gnu.build-id : + { *(.note.gnu.build-id) } + . = DATA_SEGMENT_END (.); /DISCARD/ : { *(.rel.reloc)