Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8802
-gerrit
commit 23312e8313b62f2721bc0735fae6399d34a483a1 Author: Furquan Shaikh furquan@google.com Date: Tue Aug 26 15:21:15 2014 -0700
rmodtool: Add support for aarch64
BUG=chrome-os-partner:31615 BRANCH=None TEST=Compiles succesfully, rmodule created and loaded for ryu
Change-Id: I4f3a5dbb8fc8150aa670d2e6fed56a6774feb4a6 Signed-off-by: Furquan Shaikh furquan@google.com Reviewed-on: https://chromium-review.googlesource.com/214329 Reviewed-by: Aaron Durbin adurbin@chromium.org Tested-by: Furquan Shaikh furquan@chromium.org Commit-Queue: Aaron Durbin adurbin@chromium.org --- util/cbfstool/rmodule.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
diff --git a/util/cbfstool/rmodule.c b/util/cbfstool/rmodule.c index 1c8aea7..c3b0f9b 100644 --- a/util/cbfstool/rmodule.c +++ b/util/cbfstool/rmodule.c @@ -104,6 +104,31 @@ static int should_emit_arm(struct rmod_context *ctx, Elf64_Rela *rel) return (type == R_ARM_ABS32); }
+static int valid_reloc_aarch64(struct rmod_context *ctx, Elf64_Rela *rel) +{ + int type; + + type = ELF64_R_TYPE(rel->r_info); + + return (type == R_AARCH64_ADR_PREL_PG_HI21 || + type == R_AARCH64_ADD_ABS_LO12_NC || + type == R_AARCH64_JUMP26 || + type == R_AARCH64_LDST32_ABS_LO12_NC || + type == R_AARCH64_CALL26 || + type == R_AARCH64_ABS64 || + type == R_AARCH64_LD_PREL_LO19 || + type == R_AARCH64_ADR_PREL_LO21); +} + +static int should_emit_aarch64(struct rmod_context *ctx, Elf64_Rela *rel) +{ + int type; + + type = ELF64_R_TYPE(rel->r_info); + + return (type == R_AARCH64_ABS64); +} + static struct arch_ops reloc_ops[] = { { .arch = EM_386, @@ -115,6 +140,11 @@ static struct arch_ops reloc_ops[] = { .valid_type = valid_reloc_arm, .should_emit = should_emit_arm, }, + { + .arch = EM_AARCH64, + .valid_type = valid_reloc_aarch64, + .should_emit = should_emit_aarch64, + }, };
/*