aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfnn-aarch64.c
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@arm.com>2015-06-01 10:22:15 +0100
committerJiong Wang <jiong.wang@arm.com>2015-06-01 10:22:15 +0100
commita921b5bd708cc6e8afa3cf33443cda54b4e8cae6 (patch)
treee55f41343d77f83e9bcfb1347dccbae2aa83dc9b /bfd/elfnn-aarch64.c
parent3a8547d2fb5319890dda877fb313822053083c3a (diff)
downloadgdb-a921b5bd708cc6e8afa3cf33443cda54b4e8cae6.zip
gdb-a921b5bd708cc6e8afa3cf33443cda54b4e8cae6.tar.gz
gdb-a921b5bd708cc6e8afa3cf33443cda54b4e8cae6.tar.bz2
[AArch64] GAS Support BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15
2015-06-01 Jiong.Wang <jiong.wang@arm.com> bfd/ * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15. gas/ * config/tc-aarch64.c (reloc_table): New relocation modifiers. (md_apply_fix): Support BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15. (aarch64_force_relocation): Ditto. gas/testsuite/ * gas/aarch64/reloc-insn.s: New testcase. * gas/aarch64/reloc-insn.d: Ditto.
Diffstat (limited to 'bfd/elfnn-aarch64.c')
-rw-r--r--bfd/elfnn-aarch64.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 725775d..2615f248 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 */
+ /* LD64: GOT offset to the page address of GOT table.
+ (G(S) - PAGE (_GLOBAL_OFFSET_TABLE_)) & 0x7ff8. */
+ HOWTO64 (AARCH64_R (LD64_GOTPAGE_LO15), /* type */
+ 3, /* 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 (LD64_GOTPAGE_LO15), /* name */
+ FALSE, /* partial_inplace */
+ 0x7ff8, /* src_mask */
+ 0x7ff8, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
/* Get to the page for the GOT entry for the symbol
(G(S) - P) using an ADRP instruction. */
HOWTO (AARCH64_R (TLSGD_ADR_PAGE21), /* type */