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

[PATCH for-4.15] elfstructs: add relocation defines for i386


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Wed, 24 Feb 2021 15:58:56 +0100
  • 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=HzE9BQN1GctUAEq5FuaqiEyjrg9KDf9htA4nHd5lHYs=; b=CkAo9os4Lr1Q0w/ZdHbWX02gk4W5st4Rv4Te1xg+TnPe51WFDve9V4flTx9tlCMUGuVLcF1VIP1A6xuKyLsSj0YexeL4hZ4TSFFLfZqTJEeXzLchBa2t6d+5c49wzhx9k9P+N3Qekhd8v/QTNm9wyY/ZFExFVAJt6Q5tnHtiwW3lKlxNBXS42YQJEauuwBBQ3ArTDCIHNz6Wb9FNmYs8yOGizIfs98oJzQgkWZG05LESbSwnHCa60SJoc9fmzk4rdOnG8vAuzaLrPAuNGxFotbqHcHPb5k+QFgWQ3UfFzQ31nYUzX1VDqIph38GVJ0ClHMqYHCd/c+yluMW3CZbDqQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PhrWSopI9TxhxOdquol5Ln6Zs9ecjCSmlxmeeCzldOL0Qi/ImSOry/dCp7exD91C0WkQkz1w8c/oPsmEVSRAJKngEf8zHcj8bFqah753ozaKMjl3Ji4Tbn41qY5PAPQoTCWl52nNFgnowT4BYQJgAt2p9gk8kNmfJBKvrCz17eWv4jNHb+SanzVhN99y0knozp6mBxvvjCCpJ0WOymJbboChahwIykfTfSJK4waRl05ebJWGzZpq6sTFx0tg8em//cVRDEUNNNR41d4LAtY4Z3pjBp4yOrBOZOnqipSXFmvZY21Apknw7zK08hY7SBIhjPPItM84yASyITK7Q9S+pA==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 24 Feb 2021 14:59:18 +0000
  • Ironport-sdr: s9UqbJCjIOkE1FarCBae5hZLghFEiMB/fN0KVFLT3B0TEzar2DsfULfCxgfM3Db5i90J1wyKzn n3+6P06iQ5wSifT9XJWRB6a8QCGhmFEAHHLOyATcJSrEoTKnMFtxQGvosGpEhmagPuXFMQoYz4 k8okRXAyT2PN+wghkEzwYZIxkrhhEbpIeIwcb/3e63fz/iteATY3nVQ7w6zMjFJXaPlyLzIkWo k1UL6HcNdpwqAuM21gVcDTGtZ7FxmeuYReimYRLjcQaeMq35wLhAxOyMTxfXOqppZYZn4ptXsS DIk=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Those are need by the rombios relocation code in hvmloader. Fixes the
following build error:

32bitbios_support.c: In function 'relocate_32bitbios':
32bitbios_support.c:130:18: error: 'R_386_PC32' undeclared (first use in this 
function); did you mean 'R_X86_64_PC32'?
             case R_386_PC32:
                  ^~~~~~~~~~
                  R_X86_64_PC32
32bitbios_support.c:130:18: note: each undeclared identifier is reported only 
once for each function it appears in
32bitbios_support.c:134:18: error: 'R_386_32' undeclared (first use in this 
function)
             case R_386_32:
                  ^~~~~~~~

Only add the two defines that are actually used, which seems to match
what we do for amd64.

Fixes: 81b2b328a26c1b ('hvmloader: use Xen private header for elf structs')
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 xen/include/xen/elfstructs.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/include/xen/elfstructs.h b/xen/include/xen/elfstructs.h
index 726ca8f60d..d1054ae380 100644
--- a/xen/include/xen/elfstructs.h
+++ b/xen/include/xen/elfstructs.h
@@ -348,6 +348,9 @@ typedef struct {
 #define ELF32_R_TYPE(i)                ((unsigned char) (i))
 #define ELF32_R_INFO(s,t)      (((s) << 8) + (unsigned char)(t))
 
+#define R_386_32           1            /* Direct 32 bit  */
+#define R_386_PC32         2            /* PC relative 32 bit */
+
 typedef struct {
        Elf64_Addr      r_offset;       /* where to do it */
        Elf64_Xword     r_info;         /* index & type of relocation */
-- 
2.30.1




 


Rackspace

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