On 05/08/2020 19:19, Trammell Hudson wrote:
> When building xen from head with almost any combination of options, the 
> resulting xen.efi seems properly formed. When CONFIG_LIVEPATCH is turned off, 
> however, the resulting xen.efi is corrupted in some way and binutils no 
> longer wants to work with it:
>
> ~/build/xen-clean/xen$ git rev-parse HEAD
> 81fd0d3ca4b2cd309403c6e8da662c325dd35750
> ~/build/xen-clean/xen$ diff .config.orig .config
> 71,72c71
> < CONFIG_LIVEPATCH=y
> < CONFIG_FAST_SYMBOL_LOOKUP=y
> ---
>> # CONFIG_LIVEPATCH is not set
> 105a105
>> # CONFIG_COVERAGE is not set
> ~/build/xen-clean/xen$ objcopy xen-orig.efi test.efi
> ~/build/xen-clean/xen$ objcopy xen.efi test.efi
> objcopy: test.efi: Data Directory size (1c) exceeds space left in section (18)
> objcopy: test.efi: error copying private BFD data: file in wrong format
> ~/build/xen-clean/xen$ objcopy --version | head -1
> GNU objcopy (GNU Binutils for Ubuntu) 2.34
>
>
> I spent most of today unsuccessfully trying to figure out what was different 
> between the builds (on multiple build host OS with different binutils), so 
> I'm hoping that perhaps someone else has seen this problem.

CC'ing appropriate maintainers.

The difference caused by CONFIG_LIVEPATCH will probably be the logic to
embed the GNU BuildID, which for xen.efi takes a trip through .bin/.ihex
immediately prior to the final link.

~Andrew

Reply via email to