Blame SOURCES/binutils-AArch64-gold.patch

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