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

Re: [PATCH 6/8] x86/EFI: avoid use of GNU ld's --disable-reloc-section when possible


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 22 Apr 2021 09:22:38 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZGL4S4c0BZuBJAU++1R4375StHhL2YMgVWF2It/ew2I=; b=FfbI3YMCQo6rNXWhfXC5d/kHjkvwjOfyEpE2fIxOlmw7KaeUtXxOINp2r9FUg1xmJsgiJz+lKvOwHcJXbcIDoI1W4ayBlrcoruZpWhm5fnGFZvW1CRP6eewcejvHRh3LHyngHjsJIdSvd3FNvbJApruj+evb9rGF2EdD5WBKCaLgIzNtdzxiAQHyUTenbMlF6qzn8DwWZzluBUm7B3vGqGbcMV20fr9oqXd4RADebklUiiVM3f6SDgiUoyUOWSuyKLgKYjV8Uf2erV4WVkMEpIRop7AdlDbV/B+7iavT/1KB4N9rwBAvOiHORGvbJaZsJnnCU0Ktu01L6//HPSo3tg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WbS/MzI47bgLGBLlrO4Wu8m4J789EPXIKa7oWPLyR93C/h+Kd8uT+keV9vxmnNk8cNk6o2WQYkyPyxu532UpT/3GvbBLubQqoux4PY0FMRC3p2neoP5NvWSD7ps6JhPr+rUWbuCXup0l0iefoIjBO8zemO/Qis1iT2HTPB4sV9l3dBQz/yjX11QQVzTX4+f4vcoD8fX1dWKfvwIDbH+Z46fPnKDJ2mVh0RecpmkIQojCxnkzn3Q1+8WvVisKVCFPJHL38k4jmGB9KEuQUPz0R6XF9cUnq8aFioNhaRfLYoj2L5yOORQj1A5R77DCg6EPSvSDSPngBGrHWeg4b9AY3A==
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 22 Apr 2021 07:23:14 +0000
  • Ironport-hdrordr: A9a23:8hcHxKCLVTndyVflHegetMeALOonbusQ8zAX/mhLY1h8btGYm8 eynP4SyB/zj3IrVGs9nM2bUZPvfVr1zrQwxYUKJ7+tUE3duGWuJJx/9oeK+VLdMgXE3Kpm2a 9kGpITNPTZEUV6gcHm4AOxDtYnx529/Lq1gPrFpk0McShBQchbnmFEIyycFVB7QxQDKJoiDZ yH5tdGoT3IQwVrUu2QAH4ZU+/f4+DRnJX9bhIcQzIh4g+CjTSngYSKbySw9BEYTj9J3PMe4X HI+jaJnJmLntOa7lvn12HV54lLg9eJ8Lp+LeGFl8R9EESIti+Gf4JkMofy2AwdgObq01oylc mJnhFIBbUN11r0XkWY5STgwBPh1jFG0Q6Q9Xa9jWH4qcL0ABIWYvAx/b5xSRfS50o+sNwU6s sitAj1xvknb2K0oA3H69fFTB1snEavyEBS6tI7tHBDTZAYLIZYsI13xjIkLL47ACn45Io7ed Medf302fA+SyL8U1np+kNrwNCqQ00pGAaHTkUoqqWuoklrtUE84E0CyMMFmHAcsLo7Vplf/u zBdp9ljbdUU6YtHO1ALdZEZfHyJn3GQBrKPm7XCVP7FJsfM3aIj5Ls+r066MyjZZRg9up9pL 3xFHdj8UIicUPnDsODmLdR9ArWfWm7VTPxjulD+plQoNTHNfnWGBzGbGprv9qrov0ZDMGece 20IohqD/jqKnarMZpV3jf5R4JZJRAlIY0ok+d+f2jLjtPAK4XsuOCeWu3UP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ynDPKLwA/rPSbNabAXXzzNewv2iCMajNHH97GPdHR 9vuATVun+AxCW7rd+ax+xp7jDN9d4MI5ui5vAmFkbhnMJCmI8zKCBZMxiJlkd+8NQw/pBV/VQF rwP5/iXlxBhXxJ1e14iEdmdjnfruCUZC3JrwoIf7LJJXQD4Qgb5Bs32LCNnAjVE6M4US5u4ZrR VlQ=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Apr 21, 2021 at 05:34:29PM +0200, Jan Beulich wrote:
> On 21.04.2021 17:20, Roger Pau Monné wrote:
> > On Wed, Apr 21, 2021 at 02:03:49PM +0200, Jan Beulich wrote:
> >> On 21.04.2021 12:21, Roger Pau Monné wrote:
> >>> On Thu, Apr 01, 2021 at 11:46:44AM +0200, Jan Beulich wrote:
> >>>> @@ -189,7 +208,11 @@ EFI_LDFLAGS += --no-insert-timestamp
> >>>>  endif
> >>>>  
> >>>>  $(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 
> >>>> 's, A VIRT_START$$,,p')
> >>>> +ifeq ($(MKRELOC),:)
> >>>> +$(TARGET).efi: ALT_BASE :=
> >>>> +else
> >>>>  $(TARGET).efi: ALT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 
> >>>> 's, A ALT_START$$,,p')
> >>>
> >>> Could you maybe check whether $(relocs-dummy) is set as the condition
> >>> here and use it here instead of efi/relocs-dummy.o?
> >>
> >> I can use it in the ifeq() if you think that's neater (the current way
> >> is minimally shorter), but using it in the ALT_BASE assignment would
> >> make this differ more from the VIRT_BASE one, which I'd like to avoid.
> > 
> > Sorry, I think I'm slightly confused because when the linker can
> > produce the required relocations relocs-dummy variable is left empty,
> > so it won't be added to $(TARGET).efi.
> > 
> > But we still need to generate the efi/relocs-dummy.o file for the ELF
> > build I assume?
> 
> Not anymore (after "x86/EFI: redo .reloc section bounds determination").
> We need it, as said, to fish VIRT_BASE out of it. It indeed wouldn't get
> linked into any of the final binaries anymore.

Could you please add some text to the commit message to note that
while relocs-dummy is not linked into the final binary it's still
needed to get VIRT_BASE?

With that:

Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

FWIW, it would also be nice to add some comments to the $(TARGET).efi
target commands, as it's quite impenetrable right now.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.