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

[xen master] elfstructs: add relocation defines for i386



commit 60390ccb8b9b2dbf85010f8b47779bb231aa2533
Author:     Roger Pau Monné <roger.pau@xxxxxxxxxx>
AuthorDate: Wed Feb 24 16:31:12 2021 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Feb 24 16:31:12 2021 +0100

    elfstructs: add relocation defines for i386
    
    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>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Release-Acked-by: Ian Jackson <iwj@xxxxxxxxxxxxxx>
---
 xen/include/xen/elfstructs.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/xen/include/xen/elfstructs.h b/xen/include/xen/elfstructs.h
index 726ca8f60d..616ebf9269 100644
--- a/xen/include/xen/elfstructs.h
+++ b/xen/include/xen/elfstructs.h
@@ -436,6 +436,13 @@ typedef struct {
 #define R_AARCH64_MOVW_PREL_G2_NC      292
 #define R_AARCH64_MOVW_PREL_G3         293
 
+/*
+ * Relocation definitions required by the rombios hvmloader relocation
+ * code.
+ */
+#define R_386_32           1            /* Direct 32 bit  */
+#define R_386_PC32         2            /* PC relative 32 bit */
+
 /* Program Header */
 typedef struct {
        Elf32_Word      p_type;         /* segment type */
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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