Blame SOURCES/binutils-AArch64-gold.patch

cf4a45
diff -pruN binutils-2.30.orig/gold/aarch64.cc binutils-2.30/gold/aarch64.cc
cf4a45
--- binutils-2.30.orig/gold/aarch64.cc	2019-03-28 06:50:31.813828734 -0400
cf4a45
+++ binutils-2.30/gold/aarch64.cc	2019-03-28 06:50:46.993954670 -0400
cf4a45
@@ -6478,6 +6478,17 @@ Target_aarch64<size, big_endian>::Scan::
cf4a45
 	  gold_error(_("%s: unsupported reloc %u in pos independent link."),
cf4a45
 		     object->name().c_str(), r_type);
cf4a45
 	}
cf4a45
+      // Make a PLT entry if necessary.
cf4a45
+      if (gsym->needs_plt_entry())
cf4a45
+	{
cf4a45
+	  target->make_plt_entry(symtab, layout, gsym);
cf4a45
+	  // Since this is not a PC-relative relocation, we may be
cf4a45
+	  // taking the address of a function. In that case we need to
cf4a45
+	  // set the entry in the dynamic symbol table to the address of
cf4a45
+	  // the PLT entry.
cf4a45
+	  if (gsym->is_from_dynobj() && !parameters->options().shared())
cf4a45
+	    gsym->set_needs_dynsym_value();
cf4a45
+	}
cf4a45
       break;
cf4a45
 
cf4a45
     case elfcpp::R_AARCH64_LD_PREL_LO19:        // 273
cf4a45
diff -pruN binutils-2.30.orig/gold/ChangeLog binutils-2.30/gold/ChangeLog
cf4a45
--- binutils-2.30.orig/gold/ChangeLog	2018-01-27 10:08:21.000000000 -0500
cf4a45
+++ binutils-2.30/gold/ChangeLog	2019-03-28 06:52:51.924999245 -0400
cf4a45
@@ -1,3 +1,14 @@
cf4a45
+2019-02-19  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
cf4a45
+
cf4a45
+	PR gold/23870
cf4a45
+	* aarch64.cc (Target_aarch64::Scan::global): Check if a symbol with
cf4a45
+	R_AARCH64_MOVW_.ABS_* relocations requires a PLT entry.
cf4a45
+	* testsuite/Makefile.am: Add aarch64_pr23870 test case.
cf4a45
+	* testsuite/Makefile.in: Regenerate.
cf4a45
+	* testsuite/aarch64_pr23870_bar.c: New file.
cf4a45
+	* testsuite/aarch64_pr23870_foo.c: New file.
cf4a45
+	* testsuite/aarch64_pr23870_main.S: New file.
cf4a45
+
cf4a45
 2018-01-27  Nick Clifton  <nickc@redhat.com>
cf4a45
 
cf4a45
 	This is the 2.30 release:
cf4a45
diff -pruN binutils-2.30.orig/gold/testsuite/aarch64_pr23870_bar.c binutils-2.30/gold/testsuite/aarch64_pr23870_bar.c
cf4a45
--- binutils-2.30.orig/gold/testsuite/aarch64_pr23870_bar.c	1969-12-31 19:00:00.000000000 -0500
cf4a45
+++ binutils-2.30/gold/testsuite/aarch64_pr23870_bar.c	2019-03-28 06:50:46.993954670 -0400
cf4a45
@@ -0,0 +1,6 @@
cf4a45
+void bar (void);
cf4a45
+
cf4a45
+void bar ()
cf4a45
+{
cf4a45
+  return;
cf4a45
+}
cf4a45
diff -pruN binutils-2.30.orig/gold/testsuite/aarch64_pr23870_foo.c binutils-2.30/gold/testsuite/aarch64_pr23870_foo.c
cf4a45
--- binutils-2.30.orig/gold/testsuite/aarch64_pr23870_foo.c	1969-12-31 19:00:00.000000000 -0500
cf4a45
+++ binutils-2.30/gold/testsuite/aarch64_pr23870_foo.c	2019-03-28 06:50:46.993954670 -0400
cf4a45
@@ -0,0 +1,6 @@
cf4a45
+void foo (void (*bar)(void));
cf4a45
+
cf4a45
+void foo (void (*bar)(void))
cf4a45
+{
cf4a45
+  bar();
cf4a45
+}
cf4a45
diff -pruN binutils-2.30.orig/gold/testsuite/aarch64_pr23870_main.S binutils-2.30/gold/testsuite/aarch64_pr23870_main.S
cf4a45
--- binutils-2.30.orig/gold/testsuite/aarch64_pr23870_main.S	1969-12-31 19:00:00.000000000 -0500
cf4a45
+++ binutils-2.30/gold/testsuite/aarch64_pr23870_main.S	2019-03-28 06:50:46.993954670 -0400
cf4a45
@@ -0,0 +1,15 @@
cf4a45
+
cf4a45
+	.text
cf4a45
+	.globl main
cf4a45
+	.type main,#function
cf4a45
+main:
cf4a45
+	stp	x29, x30, [sp,#-16]!
cf4a45
+	mov	x29, sp
cf4a45
+	movz	x0, #:abs_g3:bar
cf4a45
+	movk	x0, #:abs_g2_nc:bar
cf4a45
+	movk	x0, #:abs_g1_nc:bar
cf4a45
+	movk	x0, #:abs_g0_nc:bar
cf4a45
+	add     x0, x0, #0x0
cf4a45
+	bl      foo
cf4a45
+	ldp     x29, x30, [sp],#16
cf4a45
+	ret
cf4a45
diff -pruN binutils-2.30.orig/gold/testsuite/Makefile.am binutils-2.30/gold/testsuite/Makefile.am
cf4a45
--- binutils-2.30.orig/gold/testsuite/Makefile.am	2019-03-28 06:50:31.563826660 -0400
cf4a45
+++ binutils-2.30/gold/testsuite/Makefile.am	2019-03-28 06:50:46.993954670 -0400
cf4a45
@@ -3144,6 +3144,26 @@ pr22266: pr22266_main.o pr22266_ar.o gcc
cf4a45
 pr22266_ar.o: pr22266_a.o gcctestdir/ld
cf4a45
 	gcctestdir/ld -r -T $(srcdir)/pr22266_script.t -o $@ pr22266_a.o
cf4a45
 
cf4a45
+if DEFAULT_TARGET_AARCH64
cf4a45
+
cf4a45
+check_PROGRAMS += aarch64_pr23870
cf4a45
+aarch64_pr23870_SOURCES = aarch64_pr23870_foo.c
cf4a45
+aarch64_pr23870_DEPENDENCIES = \
cf4a45
+	gcctestdir/ld gcctestdir/as aarch64_pr23870_main.o \
cf4a45
+	aarch64_pr23870_foo.o aarch64_pr23870_bar.so
cf4a45
+aarch64_pr23870_LDFLAGS = -Wl,-R,. -L. -Wl,-l:aarch64_pr23870_bar.so
cf4a45
+aarch64_pr23870_LDADD = aarch64_pr23870_main.o
cf4a45
+aarch64_pr23870_main.o: aarch64_pr23870_main.S
cf4a45
+	$(COMPILE) -c -o $@ $<
cf4a45
+aarch64_pr23870_foo.o: aarch64_pr23870_foo.c
cf4a45
+	$(COMPILE) -c -o $@ $<
cf4a45
+aarch64_pr23870_bar.o: aarch64_pr23870_bar.c
cf4a45
+	$(COMPILE) -c -fPIC -o $@ $<
cf4a45
+aarch64_pr23870_bar.so: aarch64_pr23870_bar.o
cf4a45
+	$(COMPILE) -shared -o $@ $<
cf4a45
+
cf4a45
+endif DEFAULT_TARGET_AARCH64
cf4a45
+
cf4a45
 endif GCC
cf4a45
 endif NATIVE_LINKER
cf4a45
 
cf4a45
diff -pruN binutils-2.30.orig/gold/testsuite/Makefile.in binutils-2.30/gold/testsuite/Makefile.in
cf4a45
--- binutils-2.30.orig/gold/testsuite/Makefile.in	2019-03-28 06:50:31.573826743 -0400
cf4a45
+++ binutils-2.30/gold/testsuite/Makefile.in	2019-03-28 06:59:26.518313455 -0400
cf4a45
@@ -70,7 +70,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__E
cf4a45
 	$(am__EXEEXT_31) $(am__EXEEXT_32) $(am__EXEEXT_33) \
cf4a45
 	$(am__EXEEXT_34) $(am__EXEEXT_35) $(am__EXEEXT_36) \
cf4a45
 	$(am__EXEEXT_37) $(am__EXEEXT_38) $(am__EXEEXT_39) \
cf4a45
-	$(am__EXEEXT_40) $(am__EXEEXT_41)
cf4a45
+	$(am__EXEEXT_40) $(am__EXEEXT_41) $(am__EXEEXT_42)
cf4a45
 @NATIVE_OR_CROSS_LINKER_TRUE@am__append_1 = object_unittest \
cf4a45
 @NATIVE_OR_CROSS_LINKER_TRUE@	binary_unittest leb128_unittest \
cf4a45
 @NATIVE_OR_CROSS_LINKER_TRUE@	overflow_unittest
cf4a45
@@ -817,27 +817,28 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__E
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_84 = gnu_property_test.sh
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_85 = gnu_property_test.stdout
cf4a45
 @GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_86 = pr22266
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_87 = aarch64_pr23870
cf4a45
 
cf4a45
 # These tests work with native and cross linkers.
cf4a45
 
cf4a45
 # Test script section order.
cf4a45
-@NATIVE_OR_CROSS_LINKER_TRUE@am__append_87 = script_test_10.sh
cf4a45
-@NATIVE_OR_CROSS_LINKER_TRUE@am__append_88 = script_test_10.stdout
cf4a45
-@NATIVE_OR_CROSS_LINKER_TRUE@am__append_89 = script_test_10
cf4a45
+@NATIVE_OR_CROSS_LINKER_TRUE@am__append_88 = script_test_10.sh
cf4a45
+@NATIVE_OR_CROSS_LINKER_TRUE@am__append_89 = script_test_10.stdout
cf4a45
+@NATIVE_OR_CROSS_LINKER_TRUE@am__append_90 = script_test_10
cf4a45
 
cf4a45
 # These tests work with cross linkers only.
cf4a45
-@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_90 = split_i386.sh
cf4a45
-@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_91 = split_i386_1.stdout split_i386_2.stdout \
cf4a45
+@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_91 = split_i386.sh
cf4a45
+@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_92 = split_i386_1.stdout split_i386_2.stdout \
cf4a45
 @DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_i386_3.stdout split_i386_4.stdout split_i386_r.stdout
cf4a45
 
cf4a45
-@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_92 = split_i386_1 split_i386_2 split_i386_3 \
cf4a45
+@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_93 = split_i386_1 split_i386_2 split_i386_3 \
cf4a45
 @DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_i386_4 split_i386_r
cf4a45
 
cf4a45
-@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_93 = split_x86_64.sh \
cf4a45
+@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_94 = split_x86_64.sh \
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	bnd_plt_1.sh \
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	bnd_ifunc_1.sh \
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	bnd_ifunc_2.sh
cf4a45
-@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_94 = split_x86_64_1.stdout \
cf4a45
+@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_95 = split_x86_64_1.stdout \
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_x86_64_2.stdout \
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_x86_64_3.stdout \
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_x86_64_4.stdout \
cf4a45
@@ -845,14 +846,14 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__E
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	bnd_plt_1.stdout \
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	bnd_ifunc_1.stdout \
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	bnd_ifunc_2.stdout
cf4a45
-@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_95 = split_x86_64_1 split_x86_64_2 split_x86_64_3 \
cf4a45
+@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_96 = split_x86_64_1 split_x86_64_2 split_x86_64_3 \
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_x86_64_4 split_x86_64_r
cf4a45
 
cf4a45
-@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_96 = split_x32.sh
cf4a45
-@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_97 = split_x32_1.stdout split_x32_2.stdout \
cf4a45
+@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_97 = split_x32.sh
cf4a45
+@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_98 = split_x32_1.stdout split_x32_2.stdout \
cf4a45
 @DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_x32_3.stdout split_x32_4.stdout split_x32_r.stdout
cf4a45
 
cf4a45
-@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_98 = split_x32_1 split_x32_2 split_x32_3 \
cf4a45
+@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_99 = split_x32_1 split_x32_2 split_x32_3 \
cf4a45
 @DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_x32_4 split_x32_r
cf4a45
 
cf4a45
 
cf4a45
@@ -873,7 +874,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__E
cf4a45
 # Check Thumb to ARM farcall veneers
cf4a45
 
cf4a45
 # Check handling of --target1-abs, --target1-rel and --target2 options
cf4a45
-@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_99 = arm_abs_global.sh \
cf4a45
+@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_100 = arm_abs_global.sh \
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	arm_branch_in_range.sh \
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	arm_branch_out_of_range.sh \
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	arm_fix_v4bx.sh \
cf4a45
@@ -896,7 +897,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__E
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	arm_target2_got_rel.sh
cf4a45
 
cf4a45
 # The test demonstrates why the constructor of a target object should not access options.
cf4a45
-@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_100 = arm_abs_global.stdout \
cf4a45
+@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_101 = arm_abs_global.stdout \
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	arm_bl_in_range.stdout \
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	arm_bl_out_of_range.stdout \
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	thumb_bl_in_range.stdout \
cf4a45
@@ -949,7 +950,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__E
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	arm_target2_abs.stdout \
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	arm_target2_got_rel.stdout \
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	arm_target_lazy_init
cf4a45
-@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_101 = arm_abs_global \
cf4a45
+@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_102 = arm_abs_global \
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	arm_bl_in_range \
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	arm_bl_out_of_range \
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	thumb_bl_in_range \
cf4a45
@@ -1000,20 +1001,20 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__E
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	arm_target2_abs \
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	arm_target2_got_rel \
cf4a45
 @DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	arm_target_lazy_init
cf4a45
-@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_102 = aarch64_reloc_none.sh \
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_103 = aarch64_reloc_none.sh \
cf4a45
 @DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	aarch64_relocs.sh \
cf4a45
 @DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	pr21430.sh \
cf4a45
 @DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	aarch64_tlsdesc.sh
cf4a45
-@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_103 = aarch64_reloc_none.stdout \
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_104 = aarch64_reloc_none.stdout \
cf4a45
 @DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	aarch64_relocs.stdout \
cf4a45
 @DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	pr21430.stdout \
cf4a45
 @DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	aarch64_tlsdesc.stdout
cf4a45
-@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_104 = aarch64_reloc_none \
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_105 = aarch64_reloc_none \
cf4a45
 @DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	aarch64_relocs \
cf4a45
 @DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	pr21430 \
cf4a45
 @DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	aarch64_tlsdesc
cf4a45
-@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_105 = split_s390.sh
cf4a45
-@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_106 = split_s390_z1.stdout split_s390_z2.stdout split_s390_z3.stdout \
cf4a45
+@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_106 = split_s390.sh
cf4a45
+@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_107 = split_s390_z1.stdout split_s390_z2.stdout split_s390_z3.stdout \
cf4a45
 @DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_s390_z4.stdout split_s390_n1.stdout split_s390_n2.stdout \
cf4a45
 @DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_s390_a1.stdout split_s390_a2.stdout split_s390_z1_ns.stdout \
cf4a45
 @DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_s390_z2_ns.stdout split_s390_z3_ns.stdout split_s390_z4_ns.stdout \
cf4a45
@@ -1025,7 +1026,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__E
cf4a45
 @DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_s390x_z4_ns.stdout split_s390x_n1_ns.stdout \
cf4a45
 @DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_s390x_n2_ns.stdout split_s390x_r.stdout
cf4a45
 
cf4a45
-@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_107 = split_s390_z1 split_s390_z2 split_s390_z3 \
cf4a45
+@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_108 = split_s390_z1 split_s390_z2 split_s390_z3 \
cf4a45
 @DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_s390_z4 split_s390_n1 split_s390_n2 split_s390_a1 \
cf4a45
 @DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_s390_a2 split_s390_z1_ns split_s390_z2_ns split_s390_z3_ns \
cf4a45
 @DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_s390_z4_ns split_s390_n1_ns split_s390_n2_ns split_s390_r \
cf4a45
@@ -1034,10 +1035,10 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__E
cf4a45
 @DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_s390x_z1_ns split_s390x_z2_ns split_s390x_z3_ns \
cf4a45
 @DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@	split_s390x_z4_ns split_s390x_n1_ns split_s390x_n2_ns split_s390x_r
cf4a45
 
cf4a45
-@DEFAULT_TARGET_X86_64_TRUE@am__append_108 = *.dwo *.dwp
cf4a45
-@DEFAULT_TARGET_X86_64_TRUE@am__append_109 = dwp_test_1.sh \
cf4a45
+@DEFAULT_TARGET_X86_64_TRUE@am__append_109 = *.dwo *.dwp
cf4a45
+@DEFAULT_TARGET_X86_64_TRUE@am__append_110 = dwp_test_1.sh \
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@	dwp_test_2.sh
cf4a45
-@DEFAULT_TARGET_X86_64_TRUE@am__append_110 = dwp_test_1.stdout \
cf4a45
+@DEFAULT_TARGET_X86_64_TRUE@am__append_111 = dwp_test_1.stdout \
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@	dwp_test_2.stdout
cf4a45
 subdir = testsuite
cf4a45
 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
cf4a45
@@ -1243,6 +1244,11 @@ libgoldtest_a_OBJECTS = $(am_libgoldtest
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_40 = \
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@	exception_x86_64_bnd_test$(EXEEXT)
cf4a45
 @GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_41 = pr22266$(EXEEXT)
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_42 = aarch64_pr23870$(EXEEXT)
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_aarch64_pr23870_OBJECTS = aarch64_pr23870_foo.$(OBJEXT)
cf4a45
+aarch64_pr23870_OBJECTS = $(am_aarch64_pr23870_OBJECTS)
cf4a45
+aarch64_pr23870_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
cf4a45
+	$(aarch64_pr23870_LDFLAGS) $(LDFLAGS) -o $@
cf4a45
 basic_pic_test_SOURCES = basic_pic_test.c
cf4a45
 basic_pic_test_OBJECTS = basic_pic_test.$(OBJEXT)
cf4a45
 basic_pic_test_LDADD = $(LDADD)
cf4a45
@@ -2392,7 +2398,7 @@ am__depfiles_maybe = depfiles
cf4a45
 am__mv = mv -f
cf4a45
 CCLD = $(CC)
cf4a45
 CXXLD = $(CXX)
cf4a45
-SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c basic_pie_test.c \
cf4a45
+SOURCES = $(libgoldtest_a_SOURCES) $(aarch64_pr23870_SOURCES) basic_pic_test.c basic_pie_test.c \
cf4a45
 	basic_static_pic_test.c basic_static_test.c basic_test.c \
cf4a45
 	$(binary_test_SOURCES) $(binary_unittest_SOURCES) \
cf4a45
 	$(common_test_1_SOURCES) $(common_test_2_SOURCES) \
cf4a45
@@ -2830,9 +2836,9 @@ MOSTLYCLEANFILES = *.so *.syms *.stdout
cf4a45
 	$(am__append_34) $(am__append_37) $(am__append_41) \
cf4a45
 	$(am__append_47) $(am__append_51) $(am__append_52) \
cf4a45
 	$(am__append_58) $(am__append_78) $(am__append_81) \
cf4a45
-	$(am__append_83) $(am__append_89) $(am__append_92) \
cf4a45
-	$(am__append_95) $(am__append_98) $(am__append_101) \
cf4a45
-	$(am__append_104) $(am__append_107) $(am__append_108)
cf4a45
+	$(am__append_83) $(am__append_90) $(am__append_93) \
cf4a45
+	$(am__append_96) $(am__append_99) $(am__append_102) \
cf4a45
+	$(am__append_105) $(am__append_108) $(am__append_109)
cf4a45
 
cf4a45
 # We will add to these later, for each individual test.  Note
cf4a45
 # that we add each test under check_SCRIPTS or check_PROGRAMS;
cf4a45
@@ -2842,17 +2848,17 @@ check_SCRIPTS = $(am__append_2) $(am__ap
cf4a45
 	$(am__append_45) $(am__append_49) $(am__append_53) \
cf4a45
 	$(am__append_56) $(am__append_62) $(am__append_73) \
cf4a45
 	$(am__append_76) $(am__append_79) $(am__append_84) \
cf4a45
-	$(am__append_87) $(am__append_90) $(am__append_93) \
cf4a45
-	$(am__append_96) $(am__append_99) $(am__append_102) \
cf4a45
-	$(am__append_105) $(am__append_109)
cf4a45
+	$(am__append_88) $(am__append_91) $(am__append_94) \
cf4a45
+	$(am__append_97) $(am__append_100) $(am__append_103) \
cf4a45
+	$(am__append_106) $(am__append_110)
cf4a45
 check_DATA = $(am__append_3) $(am__append_20) $(am__append_24) \
cf4a45
 	$(am__append_30) $(am__append_36) $(am__append_43) \
cf4a45
 	$(am__append_46) $(am__append_50) $(am__append_54) \
cf4a45
 	$(am__append_57) $(am__append_63) $(am__append_74) \
cf4a45
 	$(am__append_77) $(am__append_80) $(am__append_85) \
cf4a45
-	$(am__append_88) $(am__append_91) $(am__append_94) \
cf4a45
-	$(am__append_97) $(am__append_100) $(am__append_103) \
cf4a45
-	$(am__append_106) $(am__append_110)
cf4a45
+	$(am__append_89) $(am__append_92) $(am__append_95) \
cf4a45
+	$(am__append_98) $(am__append_101) $(am__append_104) \
cf4a45
+	$(am__append_107) $(am__append_111)
cf4a45
 BUILT_SOURCES = $(am__append_40)
cf4a45
 TESTS = $(check_SCRIPTS) $(check_PROGRAMS)
cf4a45
 
cf4a45
@@ -3408,6 +3414,13 @@ LDADD = libgoldtest.a ../libgold.a ../..
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_DEPENDENCIES = gcctestdir/ld exception_x86_64_bnd_1.o exception_x86_64_bnd_2.o
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_LDFLAGS = $(exception_test_LDFLAGS) -Wl,-z,bndplt
cf4a45
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_LDADD = exception_x86_64_bnd_1.o exception_x86_64_bnd_2.o
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_SOURCES = aarch64_pr23870_foo.c
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_DEPENDENCIES = \
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@	gcctestdir/ld gcctestdir/as aarch64_pr23870_main.o \
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@	aarch64_pr23870_foo.o aarch64_pr23870_bar.so
cf4a45
+
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_LDFLAGS = -Wl,-R,. -L. -Wl,-l:aarch64_pr23870_bar.so
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_LDADD = aarch64_pr23870_main.o
cf4a45
 @DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200
cf4a45
 @DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200
cf4a45
 @DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200
cf4a45
@@ -3457,6 +3470,11 @@ libgoldtest.a: $(libgoldtest_a_OBJECTS)
cf4a45
 
cf4a45
 clean-checkPROGRAMS:
cf4a45
 	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
cf4a45
+
cf4a45
+aarch64_pr23870$(EXEEXT): $(aarch64_pr23870_OBJECTS) $(aarch64_pr23870_DEPENDENCIES) $(EXTRA_aarch64_pr23870_DEPENDENCIES) 
cf4a45
+	@rm -f aarch64_pr23870$(EXEEXT)
cf4a45
+	$(AM_V_CCLD)$(aarch64_pr23870_LINK) $(aarch64_pr23870_OBJECTS) $(aarch64_pr23870_LDADD) $(LIBS)
cf4a45
+
cf4a45
 @GCC_FALSE@basic_pic_test$(EXEEXT): $(basic_pic_test_OBJECTS) $(basic_pic_test_DEPENDENCIES) $(EXTRA_basic_pic_test_DEPENDENCIES) 
cf4a45
 @GCC_FALSE@	@rm -f basic_pic_test$(EXEEXT)
cf4a45
 @GCC_FALSE@	$(LINK) $(basic_pic_test_OBJECTS) $(basic_pic_test_LDADD) $(LIBS)
cf4a45
@@ -4397,6 +4415,7 @@ mostlyclean-compile:
cf4a45
 distclean-compile:
cf4a45
 	-rm -f *.tab.c
cf4a45
 
cf4a45
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aarch64_pr23870_foo.Po@am__quote@
cf4a45
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basic_pic_test.Po@am__quote@
cf4a45
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basic_pie_test.Po@am__quote@
cf4a45
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basic_static_pic_test.Po@am__quote@
cf4a45
@@ -5741,6 +5760,13 @@ pr22266.log: pr22266$(EXEEXT)
cf4a45
 	@p='pr22266$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
cf4a45
 gnu_property_test.sh.log: gnu_property_test.sh
cf4a45
 	@p='gnu_property_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
cf4a45
+aarch64_pr23870.log: aarch64_pr23870$(EXEEXT)
cf4a45
+	@p='aarch64_pr23870$(EXEEXT)'; \
cf4a45
+	b='aarch64_pr23870'; \
cf4a45
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
cf4a45
+	--log-file $$b.log --trs-file $$b.trs \
cf4a45
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
cf4a45
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
cf4a45
 .test.log:
cf4a45
 	@p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
cf4a45
 @am__EXEEXT_TRUE@.test$(EXEEXT).log:
cf4a45
@@ -7414,6 +7440,14 @@ uninstall-am:
cf4a45
 @GCC_TRUE@@NATIVE_LINKER_TRUE@	$(LINK) -Bgcctestdir/ pr22266_main.o pr22266_ar.o
cf4a45
 @GCC_TRUE@@NATIVE_LINKER_TRUE@pr22266_ar.o: pr22266_a.o gcctestdir/ld
cf4a45
 @GCC_TRUE@@NATIVE_LINKER_TRUE@	gcctestdir/ld -r -T $(srcdir)/pr22266_script.t -o $@ pr22266_a.o
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_main.o: aarch64_pr23870_main.S
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@	$(COMPILE) -c -o $@ $<
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_foo.o: aarch64_pr23870_foo.c
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@	$(COMPILE) -c -o $@ $<
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_bar.o: aarch64_pr23870_bar.c
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@	$(COMPILE) -c -fPIC -o $@ $<
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_bar.so: aarch64_pr23870_bar.o
cf4a45
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@	$(COMPILE) -shared -o $@ $<
cf4a45
 @NATIVE_OR_CROSS_LINKER_TRUE@script_test_10.o: script_test_10.s
cf4a45
 @NATIVE_OR_CROSS_LINKER_TRUE@	$(TEST_AS) -o $@ $<
cf4a45
 @NATIVE_OR_CROSS_LINKER_TRUE@script_test_10: $(srcdir)/script_test_10.t script_test_10.o gcctestdir/ld