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

Re: [PATCH 4/8] x86/EFI: redo .reloc section bounds determination


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 21 Apr 2021 11:46:31 +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=2ExYo5GYk0ZYCjB2m6wa1qY23SFn9W0dEsKeB2MJQcI=; b=azuDUepteBEoBX2Wsz+2hxJIDQK0KyE5y4NfNyxS47D/jqvfkpwrP1vTYRrkuNZPX9GMp5Epr+mKLulRJWeVX15wWAFCx1O6VNVLKs3HycbB0sPChM98ErRoY1y51cEr0aSgZ0w0ymfUjOSnko0EDK2daaQHkOpUjPxtXfhXMdBl+HKFX6QVUqybLngBlL59UVVqImeqtACdU4pqk9deVTiEQ8ex2xFDTcZzfO7wvKEpLsULEMauqdYAli/hxq3Hr09mbJSmGQkNleGXEKw43YYxH8YCbC7DQho46jqrEKLuZaVcTg3ZBRbm3OMlzJ5WYyVTVDd3PtZHl1+5gihWvg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AAvZqldqcsJnEyNR2eRF8g0tmC86dWJiLJspnBRtzucbyvgsjJpFF2qhV4zJ0vnCRTfICNt+PyQWUtczd4CWR/lhjy7VsevJVsXP8moPuvwgVASpOu1tl3nzgouB2ckOQb2AFSoAN7wOAZpwY613vv2VlhEb0ZdPQ3cQhonOv4P8cF8oq3MS5PsrcWXHj67tNjvmSqMoYmtMzRzAbsTBDR7YnMrabYaSF8CB5FHIb1Oqp45QPkuUyAOxdtQ5t6aZSgvkgCkyY4d0weLVvlLJippn2WENebF0OTJaVDAqgKVthSdB390ojjJpZ4vTfqV3uxdm+wAAecVn7cILI9RYVg==
  • Authentication-results: esa3.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: Wed, 21 Apr 2021 09:46:53 +0000
  • Ironport-hdrordr: A9a23:kYAuq6kX4bb5ch0+e4CGrXKhsRDpDfO9j2dD5ilNYBxZY6Wkvu iUtrAyyQL0hDENWHsphNCHP+26TWnB8INuiLN/AZ6LZyOjnGezNolt4c/ZwzPmEzDj7eI178 tdWoBEIpnLAVB+5PyW3CCRD8sgzN6b8KqhmOfZyDNXQRt3brx7hj0ZNi+wOCRNNW57LLA+E4 eR4dcCijq7YHIMbtm6AH5tZZm4m/TgkpX6bRkaQyM28QXmt0LS1JfWMTi9mi0fXTRG3Ks4/Q H+/TDRy62/v5iAu33h/kDJ6ZA+oqqF9vJiA4i2htEROnHQjG+TFflccpmjmBxwn+218lYtl7 D30mYdFuB+8WnYcG3wgTaF4XiY7B8U53XvyUCVjBLYyKSTLlJKaLszuatjfhTU8EYmtt1nuZ g7p16xjJZLEQjG2B30+tmgbWAVqmOPvXEgneQP5kYvN7c2Vbk5l/16wGplVL0EHC789bk9Fv hvAMz29J9tACynRkGckW91zNO2WHMvWj+AX0gZo8SQlwNbhXZj0iIjtYEit0ZF0Kh4Z4hP5u zCPKgtvLZSTvUOZaY4IOsaW8O4BkHEXBqkChPfHX3XUIU8f17doZ/+57s4oMuwfoYT8Zc0kJ PdFHtFqG8bYSvVeIyz9awO1iqIbHS2XDzrxM0bzYN+oKfASL3iNjDGYEwykvGnv+4UDqTgKr iOEaMTJ8WmAXrlGI5P0QG7cYJVM2MiXMocvct+dEmJpu7NN432ps3WePveP9P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glpZ80vr4LN4YoQkCKg7fIJPlZh9Gi2ICmNUjeQcmLEqC6QfEnYbYRc59r9G+g0sDOXQP8cTsv ECf7IMKhOt6dRfrg0I+adxiz6bKf7Fn/dtYRUmyz33ocrX9O8Lb0bKL+V7ol9kmQvMZZdKK1jV Jb4=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Apr 01, 2021 at 11:45:38AM +0200, Jan Beulich wrote:
> There's no need to link relocs-dummy.o into the ELF binary. The two
> symbols needed can as well be provided by the linker script. Then our
> mkreloc tool also doesn't need to put them in the generated assembler
> source.

Maybe I'm just dense today, but I think the message needs to be
expanded a bit to mention that while the __base_relocs_{start,end} are
not used when loaded as an EFI application, they are used by the EFI
code in Xen when booted using the multiboot2 protocol for example, as
they are used by efi_arch_relocate_image.

I think relocation is not needed when natively loaded as an EFI
application, as then the load address matches the one expected by
Xen?

I also wonder, at some point there where plans for providing a single
binary that would work as multiboot{1,2} and also be capable of being
loaded as an EFI application (ie: have a PE/COFF header also I assume
together with the ELF one), won't the changes here make it more
difficult to reach that goal or require reverting later on, as I feel
they are adding more differences between the PE binary and the ELF
one.

The code LGTM, but I think at least I would like the commit message to
be expanded.

Thanks, Roger.



 


Rackspace

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