aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorRenlin Li <renlin.li@arm.com>2015-10-02 15:42:01 +0100
committerRenlin Li <renlin.li@arm.com>2015-10-02 17:56:07 +0100
commitca632371cebf83eb9b5ce951bbe734e7636aa614 (patch)
tree2c573f869ea2f02307e9e031c881621820dcdcce /bfd
parent74a1bfe1d6e7e85fffad518f50575a44630d9293 (diff)
downloadgdb-ca632371cebf83eb9b5ce951bbe734e7636aa614.zip
gdb-ca632371cebf83eb9b5ce951bbe734e7636aa614.tar.gz
gdb-ca632371cebf83eb9b5ce951bbe734e7636aa614.tar.bz2
[GAS][AARCH64]Add BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC Support.
bfd/ 2015-10-02 Renlin Li <renlin.li@arm.com> * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry MOVW_GOTOFF_G0_NC. * libbfd.h: Regnerate. * bfd-in2.h: Regenerate. gas/ 2015-10-02 Renlin Li <renlin.li@arm.com> * config/tc-aarch64.c (reloc_table): New relocation modifier gotoff_g0_nc. (process_movw_reloc_info): Support gotoff_g0_nc. (md_apply_fix): Likewise. gas/testsuite/ 2015-10-02 Renlin Li <renlin.li@arm.com> * gas/aarch64/reloc-gotoff_g0_nc.s: New. * gas/aarch64/reloc-gotoff_g0_nc.d: New.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/bfd-in2.h4
-rw-r--r--bfd/elfnn-aarch64.c15
-rw-r--r--bfd/libbfd.h1
-rw-r--r--bfd/reloc.c5
5 files changed, 33 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f92ef66..2f7e584 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,13 @@
2015-10-02 Renlin Li <renlin.li@arm.com>
+ * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New.
+ * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry
+ MOVW_GOTOFF_G0_NC.
+ * libbfd.h: Regnerate.
+ * bfd-in2.h: Regenerate.
+
+2015-10-02 Renlin Li <renlin.li@arm.com>
+
* elfnn-aarch64.c (aarch64_reloc_got_type): Add support
for BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
(elfNN_aarch64_gc_sweep_hook): Likewise.
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 9c4b349..6cd47ec 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -5754,6 +5754,10 @@ the GOT entry for this symbol. Used in conjunction with
BFD_RELOC_AARCH64_ADR_GOTPAGE. Valid in ILP32 ABI only. */
BFD_RELOC_AARCH64_LD32_GOT_LO12_NC,
+/* Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry
+for this symbol. Valid in LP64 ABI only. */
+ BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
+
/* Unsigned 16 bit byte higher offset for 64 bit load/store from the GOT entry
for this symbol. Valid in LP64 ABI only. */
BFD_RELOC_AARCH64_MOVW_GOTOFF_G1,
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 715eff6..49d6eee 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -884,6 +884,21 @@ static reloc_howto_type elfNN_aarch64_howto_table[] =
0xffc, /* dst_mask */
FALSE), /* pcrel_offset */
+ /* Lower 16 bits of GOT offset for the symbol. */
+ HOWTO64 (AARCH64_R (MOVW_GOTOFF_G0_NC), /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ AARCH64_R_STR (MOVW_GOTOFF_G0_NC), /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
/* Higher 16 bits of GOT offset for the symbol. */
HOWTO64 (AARCH64_R (MOVW_GOTOFF_G1), /* type */
16, /* rightshift */
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index ae5b2b0..9483c0a 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -2747,6 +2747,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_AARCH64_ADR_GOT_PAGE",
"BFD_RELOC_AARCH64_LD64_GOT_LO12_NC",
"BFD_RELOC_AARCH64_LD32_GOT_LO12_NC",
+ "BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC",
"BFD_RELOC_AARCH64_MOVW_GOTOFF_G1",
"BFD_RELOC_AARCH64_LD64_GOTOFF_LO15",
"BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14",
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 750a612..cec9a1f 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -6789,6 +6789,11 @@ ENUMDOC
Unsigned 12 bit byte offset for 32 bit load/store from the page of
the GOT entry for this symbol. Used in conjunction with
BFD_RELOC_AARCH64_ADR_GOTPAGE. Valid in ILP32 ABI only.
+ ENUM
+ BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC
+ENUMDOC
+ Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry
+ for this symbol. Valid in LP64 ABI only.
ENUM
BFD_RELOC_AARCH64_MOVW_GOTOFF_G1
ENUMDOC