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

Re: [Xen-devel] [PATCH 3/4] x86/linker: add a reloc section to ELF binary


  • To: Jan Beulich <JBeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 19 Jun 2019 17:06:31 +0200
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@xxxxxxxxxx; spf=Pass smtp.mailfrom=roger.pau@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, WeiLiu <wl@xxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 19 Jun 2019 15:06:42 +0000
  • Ironport-sdr: EvMbVPGtKP0aWfDlN15WMC9qhGq9rKQkugQiFMMKPmzYCfGzt57e9qY0Z2sTsjCg0CFGNaQcI8 MvdEZuXkmGSzsTjqd/QNqT42FqThdj38uqc+D+K3JGUJHKITUDCxLBKi37tC8I4XjmxBJuljzL CeKt8/bL88Y04BoOEzfXr3LbMErAUNX02vQ4Tape06Mb9uYF4NGcb/Uz/AQ1rbXI1tUFoMGIeL +aPN3Wu+3XGhlpJM/wjME9kUtObUZ139d+9ClRmwVTv17u+wbDhvE7XhPmij9gBh2r2dXeSKxH ecM=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Jun 19, 2019 at 06:57:05AM -0600, Jan Beulich wrote:
> >>> On 19.06.19 at 13:02, <roger.pau@xxxxxxxxxx> wrote:
> > If the hypervisor has been built with EFI support (ie: multiboot2).
> > This allows to position the .reloc section correctly in the output
> > binary, or else the linker might place .reloc before the .text
> > section.
> > 
> > Note that the .reloc section is moved before .bss for two reasons: in
> > order for the resulting binary to not contain any section with data
> > after .bss, so that the file size can be smaller than the loaded
> > memory size, and because the data it contains is read-only, so it
> > belongs with the other sections containing read-only data.
> 
> While this may be fine for ELF, I'm afraid it would be calling for
> subtle issues with xen.efi (i.e. the PE binary): There a .reloc
> section is generally expected to come after "normal" data
> sections.

OK, would you like me to leave the .reloc section at the previous
position for EFI builds then?

Or do we prefer to leave .reloc orphaned in the ELF build?

> On the whole, seeing all these adjustments for a linker behavior
> I'm tempted to call buggy, I'm not sure whether we shouldn't
> instead declare this linker version as unusable with Xen. I can't
> imagine that they're going to leave it as it is right now.

I've already submitted a bug report, let's see if this can be fixed
and backported to 8. It's a shame because previous versions of lld
worked just fine, and I would consider this a lld regression.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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