[coreboot-gerrit] New patch to review for coreboot: 1b2d3dd cbfstool: Add relocation codes for arm mode

Marc Jones (marc.jones@se-eng.com) gerrit at coreboot.org
Fri Mar 13 23:34:06 CET 2015


Marc Jones (marc.jones at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8675

-gerrit

commit 1b2d3ddbe25d12def65d6b685191e2694c1a4098
Author: Furquan Shaikh <furquan at google.com>
Date:   Wed Jul 23 13:42:22 2014 -0700

    cbfstool: Add relocation codes for arm mode
    
    Add relocation codes required for arm mode. These are required by armv4.
    
    BUG=chrome-os-partner:30784
    BRANCH=None
    TEST=Compiles successfully for rush
    
    Original-Change-Id: Ie7c5b3e07689c85091036a619a65f9fea1918b6b
    Original-Signed-off-by: Furquan Shaikh <furquan at google.com>
    Original-Reviewed-on: https://chromium-review.googlesource.com/209973
    Original-Tested-by: Furquan Shaikh <furquan at chromium.org>
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
    Original-Commit-Queue: Aaron Durbin <adurbin at chromium.org>
    (cherry picked from commit dc5f411f95e02a02b4a4ef4652303ce62aa220c2)
    Signed-off-by: Marc Jones <marc.jones at se-eng.com>
    
    Change-Id: Ie62ed730080299e474c256371ab88f605b54c10f
---
 util/cbfstool/elf.h     | 3 +++
 util/cbfstool/rmodule.c | 5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/util/cbfstool/elf.h b/util/cbfstool/elf.h
index 8b56a71..f6356c6 100644
--- a/util/cbfstool/elf.h
+++ b/util/cbfstool/elf.h
@@ -2222,6 +2222,8 @@ typedef Elf32_Addr Elf32_Conflict;
 #define R_ARM_GOTPC		25	/* 32 bit PC relative offset to GOT */
 #define R_ARM_GOT32		26	/* 32 bit GOT entry */
 #define R_ARM_PLT32		27	/* 32 bit PLT address */
+#define R_ARM_CALL              28
+#define R_ARM_JUMP24            29
 #define R_ARM_THM_JUMP24	30
 #define R_ARM_ALU_PCREL_7_0	32
 #define R_ARM_ALU_PCREL_15_8	33
@@ -2229,6 +2231,7 @@ typedef Elf32_Addr Elf32_Conflict;
 #define R_ARM_LDR_SBREL_11_0	35
 #define R_ARM_ALU_SBREL_19_12	36
 #define R_ARM_ALU_SBREL_27_20	37
+#define R_ARM_V4BX              40
 #define R_ARM_GNU_VTENTRY	100
 #define R_ARM_GNU_VTINHERIT	101
 #define R_ARM_THM_PC11		102	/* thumb unconditional branch */
diff --git a/util/cbfstool/rmodule.c b/util/cbfstool/rmodule.c
index 966c364..1c8aea7 100644
--- a/util/cbfstool/rmodule.c
+++ b/util/cbfstool/rmodule.c
@@ -88,9 +88,10 @@ static int valid_reloc_arm(struct rmod_context *ctx, Elf64_Rela *rel)
 
 	type = ELF64_R_TYPE(rel->r_info);
 
-	/* Only these 3 relocations are expected to be found. */
+	/* Only these 6 relocations are expected to be found. */
 	return (type == R_ARM_ABS32 || type == R_ARM_THM_PC22 ||
-                type == R_ARM_THM_JUMP24);
+                type == R_ARM_THM_JUMP24 || type == R_ARM_V4BX ||
+		type == R_ARM_CALL || type == R_ARM_JUMP24);
 }
 
 static int should_emit_arm(struct rmod_context *ctx, Elf64_Rela *rel)



More information about the coreboot-gerrit mailing list