This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] ABS32


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=30bdf5c82e5734ac9f0b18eb7af631806d419270

commit 30bdf5c82e5734ac9f0b18eb7af631806d419270
Author: Renlin Li <renlin.li@arm.com>
Date:   Thu Feb 18 16:50:50 2016 +0000

    ABS32

Diff:
---
 bfd/elfnn-aarch64.c                      | 18 +++++++++++++++---
 ld/testsuite/ld-aarch64/aarch64-elf.exp  |  1 +
 ld/testsuite/ld-aarch64/relocs-258-dyn.d |  8 ++++++++
 ld/testsuite/ld-aarch64/relocs-258-dyn.s |  8 ++++++++
 4 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 16a6eea..af7b789 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -4983,6 +4983,9 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
 	  bfd_set_error (bfd_error_bad_value);
 	  return FALSE;
 
+#if ARCH_SIZE == 64
+	case BFD_RELOC_AARCH64_32:
+#endif
 	case BFD_RELOC_AARCH64_NN:
 	  if (rel->r_addend != 0)
 	    {
@@ -5155,6 +5158,9 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
       *unresolved_reloc_p = FALSE;
       return bfd_reloc_ok;
 
+#if ARCH_SIZE == 64
+    case BFD_RELOC_AARCH64_32:
+#endif
     case BFD_RELOC_AARCH64_NN:
 
       /* When generating a shared object or relocatable executable, these
@@ -5320,9 +5326,6 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
 	}
 
     case BFD_RELOC_AARCH64_16:
-#if ARCH_SIZE == 64
-    case BFD_RELOC_AARCH64_32:
-#endif
     case BFD_RELOC_AARCH64_ADD_LO12:
     case BFD_RELOC_AARCH64_BRANCH19:
     case BFD_RELOC_AARCH64_LDST128_LO12:
@@ -6797,6 +6800,9 @@ elfNN_aarch64_gc_sweep_hook (bfd *abfd,
 	case BFD_RELOC_AARCH64_MOVW_G1_NC:
 	case BFD_RELOC_AARCH64_MOVW_G2_NC:
 	case BFD_RELOC_AARCH64_MOVW_G3:
+#if ARCH_SIZE == 64
+	case BFD_RELOC_AARCH64_32:
+#endif
 	case BFD_RELOC_AARCH64_NN:
 	  if (h != NULL && bfd_link_executable (info))
 	    {
@@ -7102,6 +7108,9 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info,
 	    case BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:
 	    case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:
 	    case BFD_RELOC_AARCH64_MOVW_GOTOFF_G1:
+#if ARCH_SIZE == 64
+	    case BFD_RELOC_AARCH64_32:
+#endif
 	    case BFD_RELOC_AARCH64_NN:
 	      if (htab->root.dynobj == NULL)
 		htab->root.dynobj = abfd;
@@ -7117,6 +7126,9 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info,
 
       switch (bfd_r_type)
 	{
+#if ARCH_SIZE == 64
+	case BFD_RELOC_AARCH64_32:
+#endif
 	case BFD_RELOC_AARCH64_NN:
 
 	  /* We don't need to handle relocs into sections not going into
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index d0b33cf..65a0549 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -185,6 +185,7 @@ run_dump_test "farcall-bl-none-function"
 run_dump_test "farcall-b-section"
 run_dump_test "farcall-bl-section"
 
+run_dump_test "relocs-258-dyn"
 run_dump_test "tls-relax-all"
 run_dump_test "tls-relax-gd-le"
 run_dump_test "tls-relax-gdesc-le"
diff --git a/ld/testsuite/ld-aarch64/relocs-258-dyn.d b/ld/testsuite/ld-aarch64/relocs-258-dyn.d
new file mode 100644
index 0000000..4b769b7
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/relocs-258-dyn.d
@@ -0,0 +1,8 @@
+#source: relocs-258-dyn.s
+#ld: --defsym dummy=0x45034 -T aarch64.ld   -shared
+#readelf: -Wr
+
+Relocation section '\.rela\.dyn' at offset 0x8080 contains 2 entries:
+    Offset             Info             Type               Symbol's Value  Symbol's Name \+ Addend
+0000000000008010  0000000000000403 R_AARCH64_RELATIVE                        800c
+000000000000800c  0000000200000102 R_AARCH64_ABS32        0000000000045034 dummy \+ 0
diff --git a/ld/testsuite/ld-aarch64/relocs-258-dyn.s b/ld/testsuite/ld-aarch64/relocs-258-dyn.s
new file mode 100644
index 0000000..91d4738
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/relocs-258-dyn.s
@@ -0,0 +1,8 @@
+.text
+	ldr x0, .LC0
+	ldr x0, .LC1
+	ret
+.LC0:
+	.word dummy
+.LC1:
+	.word .LC0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]