On 2/24/25 06:55, Sam Edwards wrote:
This section is required by .dynamic and llvm-objcopy will exit with a
fatal error if it is not also preserved in the output.

Signed-off-by: Sam Edwards <cfswo...@gmail.com>
---
  scripts/Makefile.lib | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 18993435eae..275c308154b 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -513,8 +513,8 @@ $(obj)/%_efi.S: $(obj)/%.efi
        $(call cmd,S_efi)

  quiet_cmd_efi_objcopy = OBJCOPY $@
-cmd_efi_objcopy = $(OBJCOPY) -j .header -j .text -j .sdata -j .data -j \
-               .dynamic -j .dynsym  -j .rel* -j .rela* -j .reloc \
+cmd_efi_objcopy = $(OBJCOPY) -j .header -j .text -j .sdata -j .data \
+               -j .dynamic -j .dynstr  -j .dynsym -j .rel* -j .reloc \
                $(if $(EFI_TARGET),$(EFI_TARGET),-O binary) $^ $@

  $(obj)/%.efi: $(obj)/%_efi.so

I see sections .dynsym and .dynstr in intermediate *.so files but no
.dynamic section.

Why would we need a .dynamic section for a static EFI application?

Best regards

Heinrich


Reply via email to