Re: [kvm-unit-tests PATCH v6 28/32] arm64: Add support for efi in Makefile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 08, 2023 at 01:41:58PM -0700, Nadav Amit wrote:
...
> > +%.efi: %.so
> > + $(call arch_elf_check, $^)
> > + $(OBJCOPY) \
> > + -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
> > + -j .rel -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \
> > + -j .reloc \
> > + -O binary $^ $@
> 
> I really appreciate your work Nikos, and I might be late since I see Drew
> already applied it to his queue.

It's not too late. arm/queue isn't stable so we can apply fixes while it
bakes there.

> So consider this email, my previous one, and
> others that might follow more as grievances that can easily be addressed later.
> 
> So: It would’ve been nice to keep the symbols and debug information in a
> separate file. Something like:
> 
> diff --git a/arm/Makefile.common b/arm/Makefile.common
> index d60cf8c..f904702 100644
> --- a/arm/Makefile.common
> +++ b/arm/Makefile.common
> @@ -69,7 +69,7 @@ FLATLIBS = $(libcflat) $(LIBFDT_archive) $(libeabi)
>  ifeq ($(CONFIG_EFI),y)
>  %.so: EFI_LDFLAGS += -defsym=EFI_SUBSYSTEM=0xa --no-undefined
>  %.so: %.o $(FLATLIBS) $(SRCDIR)/arm/efi/elf_aarch64_efi.lds $(cstart.o)
> -       $(CC) $(CFLAGS) -c -o $(@:.so=.aux.o) $(SRCDIR)/lib/auxinfo.c \
> +       $(CC) $(CFLAGS) -c -g -o $(@:.so=.aux.o) $(SRCDIR)/lib/auxinfo.c \
>                 -DPROGNAME=\"$(@:.so=.efi)\" -DAUXFLAGS=$(AUXFLAGS)
>         $(LD) $(EFI_LDFLAGS) -o $@ -T $(SRCDIR)/arm/efi/elf_aarch64_efi.lds \
>                 $(filter %.o, $^) $(FLATLIBS) $(@:.so=.aux.o) \
> @@ -78,6 +78,9 @@ ifeq ($(CONFIG_EFI),y)
>    %.efi: %.so
>         $(call arch_elf_check, $^)
> +       $(OBJCOPY) --only-keep-debug $^ $@.debug
> +       $(OBJCOPY) --strip-debug $^
> +       $(OBJCOPY) --add-gnu-debuglink=$@.debug $^
>         $(OBJCOPY) \
>                 -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
>                 -j .rel -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \

This is nice, but I think it can wait and be posted later.

Thanks,
drew



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux