xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad@kernel.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 2/2] x86/EFI: use less crude way of generating the build ID
Date: Sun, 14 Aug 2016 19:42:05 -0400	[thread overview]
Message-ID: <20160814234205.GA3985@localhost.localdomain> (raw)
In-Reply-To: <57ADFD32020000780010580C@prv-mh.provo.novell.com>

> --- a/xen/arch/x86/Makefile
> +++ b/xen/arch/x86/Makefile
> @@ -158,24 +158,30 @@ $(TARGET).efi: VIRT_BASE = 0x$(shell $(N
>  $(TARGET).efi: ALT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A ALT_START$$,,p')
>  # Don't use $(wildcard ...) here - at least make 3.80 expands this too early!
>  $(TARGET).efi: guard = $(if $(shell echo efi/dis* | grep disabled),:)
> +
>  ifneq ($(build_id_linker),)
> -$(TARGET).efi: note.o
> +ifeq ($(call ld-ver-build-id,$(LD) $(EFI_LDFLAGS)),y)
> +CFLAGS += -DBUILD_ID_EFI
> +EFI_LDFLAGS += $(build_id_linker)
> +note_file := efi/buildid.o
> +else
>  note_file := note.o
> +endif
>  else
>  note_file :=
>  endif
>  
> -$(TARGET).efi: prelink-efi.o efi.lds efi/relocs-dummy.o $(BASEDIR)/common/symbols-dummy.o efi/mkreloc
> +$(TARGET).efi: prelink-efi.o $(note_file) efi.lds efi/relocs-dummy.o $(BASEDIR)/common/symbols-dummy.o efi/mkreloc
>  	$(foreach base, $(VIRT_BASE) $(ALT_BASE), \
>  	          $(guard) $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< efi/relocs-dummy.o \
> -	                $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).$(base).0 &&) :
> +	                $(BASEDIR)/common/symbols-dummy.o $(note_file) -o $(@D)/.$(@F).$(base).0 &&) :
>  	$(guard) efi/mkreloc $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).0) >$(@D)/.$(@F).0r.S
>  	$(guard) $(NM) -pa --format=sysv $(@D)/.$(@F).$(VIRT_BASE).0 \
>  		| $(guard) $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0s.S
>  	$(guard) $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o
>  	$(foreach base, $(VIRT_BASE) $(ALT_BASE), \
>  	          $(guard) $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< \
> -	                $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o -o $(@D)/.$(@F).$(base).1 &&) :
> +	                $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o $(note_file) -o $(@D)/.$(@F).$(base).1 &&) :
>  	$(guard) efi/mkreloc $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).1) >$(@D)/.$(@F).1r.S
>  	$(guard) $(NM) -pa --format=sysv $(@D)/.$(@F).$(VIRT_BASE).1 \
>  		| $(guard) $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1s.S
> @@ -185,8 +191,8 @@ $(TARGET).efi: prelink-efi.o efi.lds efi
>  	if $(guard) false; then rm -f $@; echo 'EFI support disabled'; fi
>  	rm -f $(@D)/.$(@F).[0-9]*
>  
> -efi/boot.init.o efi/runtime.o efi/compat.o: $(BASEDIR)/arch/x86/efi/built_in.o
> -efi/boot.init.o efi/runtime.o efi/compat.o: ;
> +efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o: $(BASEDIR)/arch/x86/efi/built_in.o
> +efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o: ;
>  
>  asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c
>  	$(CC) $(filter-out -flto,$(CFLAGS)) -S -o $@ $<
> --- a/xen/arch/x86/efi/Makefile
> +++ b/xen/arch/x86/efi/Makefile
> @@ -9,6 +9,9 @@ efi := $(if $(efi),$(shell $(CC) $(filte
>  efi := $(if $(efi),$(shell $(LD) -mi386pep --subsystem=10 -o check.efi check.o 2>disabled && echo y))
>  efi := $(if $(efi),$(shell rm disabled)y,$(shell $(call create,boot.init.o); $(call create,runtime.o)))
>  
> -extra-$(efi) += boot.init.o relocs-dummy.o runtime.o compat.o
> +extra-$(efi) += boot.init.o relocs-dummy.o runtime.o compat.o buildid.o
> +
> +%.o: %.ihex
> +	$(OBJCOPY) -I ihex -O binary $< $@
>  



Under  Ubuntu 14.04.4 this fails compilation:


make[4]: *** No rule to make target `buildid.o', needed by `stub.o'.
Stop.


The properties of Ubuntu 14.04.4 are:
konrad@ubuntu:~/xen$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
konrad@ubuntu:~/xen/xen$ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.24
konrad@ubuntu:~/xen/xen$ ld -mi386pep
ld: no input files

konrad@ubuntu:~/xen/xen$ cat /etc/debian_version 
jessie/sid

Hadn't dug in this.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-08-14 23:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12 14:39 [PATCH 0/2] build-id adjustments Jan Beulich
2016-08-12 14:45 ` [PATCH 1/2] build-id: fix minor quirks Jan Beulich
2016-08-12 20:30   ` Konrad Rzeszutek Wilk
2016-08-12 14:45 ` [PATCH 2/2] x86/EFI: use less crude way of generating the build ID Jan Beulich
2016-08-14 23:42   ` Konrad Rzeszutek Wilk [this message]
2016-08-15  7:58     ` Jan Beulich
2016-08-15 14:15       ` Konrad Rzeszutek Wilk
2016-08-19 16:14         ` Konrad Rzeszutek Wilk
2016-08-22  7:01           ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160814234205.GA3985@localhost.localdomain \
    --to=konrad@kernel.org \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).