[PATCH 2/3] x86/EFI: Explain buildid.ihex

Andrew Cooper posted 3 patches 4 months, 3 weeks ago
[PATCH 2/3] x86/EFI: Explain buildid.ihex
Posted by Andrew Cooper 4 months, 3 weeks ago
This is an awful lot of magic to only be explained in a commit message.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Ross Lagerwall <ross.lagerwall@citrix.com>
CC: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
CC: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/arch/x86/efi/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile
index c6678652fc98..3e88f552d20b 100644
--- a/xen/arch/x86/efi/Makefile
+++ b/xen/arch/x86/efi/Makefile
@@ -6,6 +6,8 @@ cmd_objcopy_o_ihex = $(OBJCOPY) -I ihex -O binary $< $@
 $(obj)/%.o: $(src)/%.ihex FORCE
 	$(call if_changed,objcopy_o_ihex)
 
+# buildid.ihex is an empty COFF object.  It exists for the side effect it has
+# when linking into xen.efi, causing --build-id to attach a .buildid section.
 $(obj)/boot.init.o: $(obj)/buildid.o
 
 $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary=4)
-- 
2.39.5


Re: [PATCH 2/3] x86/EFI: Explain buildid.ihex
Posted by Marek Marczykowski-Górecki 3 months ago
On Thu, Jun 05, 2025 at 12:16:37PM +0100, Andrew Cooper wrote:
> This is an awful lot of magic to only be explained in a commit message.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>

> ---
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Roger Pau Monné <roger.pau@citrix.com>
> CC: Ross Lagerwall <ross.lagerwall@citrix.com>
> CC: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> CC: Daniel P. Smith <dpsmith@apertussolutions.com>
> ---
>  xen/arch/x86/efi/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile
> index c6678652fc98..3e88f552d20b 100644
> --- a/xen/arch/x86/efi/Makefile
> +++ b/xen/arch/x86/efi/Makefile
> @@ -6,6 +6,8 @@ cmd_objcopy_o_ihex = $(OBJCOPY) -I ihex -O binary $< $@
>  $(obj)/%.o: $(src)/%.ihex FORCE
>  	$(call if_changed,objcopy_o_ihex)
>  
> +# buildid.ihex is an empty COFF object.  It exists for the side effect it has
> +# when linking into xen.efi, causing --build-id to attach a .buildid section.
>  $(obj)/boot.init.o: $(obj)/buildid.o
>  
>  $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary=4)
> -- 
> 2.39.5
> 

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
Re: [PATCH 2/3] x86/EFI: Explain buildid.ihex
Posted by Jan Beulich 4 months, 3 weeks ago
On 05.06.2025 13:16, Andrew Cooper wrote:
> This is an awful lot of magic to only be explained in a commit message.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>