From 3d715ce4202ef799e288261d08a5438c82e7c21e Mon Sep 17 00:00:00 2001 From: Jiong Wang Date: Mon, 1 Jun 2015 15:41:54 +0100 Subject: [AArch64] GAS support BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14 This patch add BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14 support in Gas. The relocation modifier === :gotpage_lo14:symbol 2015-06-01 Jiong.Wang bfd/ * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14. gas/ * config/tc-aarch64.c (reloc_table): New relocation modifiers. (md_apply_fix): Support BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14. (aarch64_force_relocation): Ditto. gas/testsuite/ * gas/aarch64/ilp32-basic.s: New testcase. * gas/aarch64/ilp32-basic.d: Ditto. --- bfd/elfnn-aarch64.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'bfd/elfnn-aarch64.c') diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 26f20c5..3104de7 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -848,6 +848,22 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 0xffc, /* dst_mask */ FALSE), /* pcrel_offset */ + /* LD32: GOT offset to the page address of GOT table. + (G(S) - PAGE (_GLOBAL_OFFSET_TABLE_)) & 0x5ffc. */ + HOWTO32 (AARCH64_R (LD32_GOTPAGE_LO14), /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 12, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_unsigned, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + AARCH64_R_STR (LD32_GOTPAGE_LO14), /* name */ + FALSE, /* partial_inplace */ + 0x5ffc, /* src_mask */ + 0x5ffc, /* dst_mask */ + FALSE), /* pcrel_offset */ + /* LD64: GOT offset to the page address of GOT table. (G(S) - PAGE (_GLOBAL_OFFSET_TABLE_)) & 0x7ff8. */ HOWTO64 (AARCH64_R (LD64_GOTPAGE_LO15), /* type */ -- cgit v1.1