aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorEgeyar Bagcioglu <egeyar.bagcioglu@oracle.com>2019-02-19 16:12:44 -0800
committerCary Coutant <ccoutant@gmail.com>2019-02-19 16:13:24 -0800
commit7ae39e2d406dbec568c5ffd462119037b994fdf9 (patch)
tree8f6e921deb682b55a758a42f3305a8cb1cc29bd3 /gold
parentabaeb1562648d4b58497040a20d772bd08c06d4b (diff)
downloadgdb-7ae39e2d406dbec568c5ffd462119037b994fdf9.zip
gdb-7ae39e2d406dbec568c5ffd462119037b994fdf9.tar.gz
gdb-7ae39e2d406dbec568c5ffd462119037b994fdf9.tar.bz2
Check whether symbols with MOVW_.ABS relocations require PLT entries (aarch64).
2019-02-19 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com> gold/ PR gold/23870 * aarch64.cc (Target_aarch64::Scan::global): Check if a symbol with R_AARCH64_MOVW_.ABS_* relocations requires a PLT entry. * testsuite/Makefile.am: Add aarch64_pr23870 test case. * testsuite/Makefile.in: Regenerate. * testsuite/aarch64_pr23870_bar.c: New file. * testsuite/aarch64_pr23870_foo.c: New file. * testsuite/aarch64_pr23870_main.S: New file.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog11
-rw-r--r--gold/aarch64.cc11
-rw-r--r--gold/testsuite/Makefile.am20
-rw-r--r--gold/testsuite/Makefile.in121
-rw-r--r--gold/testsuite/aarch64_pr23870_bar.c6
-rw-r--r--gold/testsuite/aarch64_pr23870_foo.c6
-rw-r--r--gold/testsuite/aarch64_pr23870_main.S15
7 files changed, 146 insertions, 44 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index f9df977..f74b92e 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,14 @@
+2019-02-19 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
+
+ PR gold/23870
+ * aarch64.cc (Target_aarch64::Scan::global): Check if a symbol with
+ R_AARCH64_MOVW_.ABS_* relocations requires a PLT entry.
+ * testsuite/Makefile.am: Add aarch64_pr23870 test case.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/aarch64_pr23870_bar.c: New file.
+ * testsuite/aarch64_pr23870_foo.c: New file.
+ * testsuite/aarch64_pr23870_main.S: New file.
+
2019-02-12 Nick Clifton <nickc@redhat.com>
* po/fr.po: Updated French translation.
diff --git a/gold/aarch64.cc b/gold/aarch64.cc
index bb98edc..a45d3fd 100644
--- a/gold/aarch64.cc
+++ b/gold/aarch64.cc
@@ -6496,6 +6496,17 @@ Target_aarch64<size, big_endian>::Scan::global(
gold_error(_("%s: unsupported reloc %u in pos independent link."),
object->name().c_str(), r_type);
}
+ // Make a PLT entry if necessary.
+ if (gsym->needs_plt_entry())
+ {
+ target->make_plt_entry(symtab, layout, gsym);
+ // Since this is not a PC-relative relocation, we may be
+ // taking the address of a function. In that case we need to
+ // set the entry in the dynamic symbol table to the address of
+ // the PLT entry.
+ if (gsym->is_from_dynobj() && !parameters->options().shared())
+ gsym->set_needs_dynsym_value();
+ }
break;
case elfcpp::R_AARCH64_LD_PREL_LO19: // 273
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index e44cf6e..e499177 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -3285,6 +3285,26 @@ pr22266: pr22266_main.o pr22266_ar.o gcctestdir/ld
pr22266_ar.o: pr22266_a.o gcctestdir/ld
gcctestdir/ld -r -T $(srcdir)/pr22266_script.t -o $@ pr22266_a.o
+if DEFAULT_TARGET_AARCH64
+
+check_PROGRAMS += aarch64_pr23870
+aarch64_pr23870_SOURCES = aarch64_pr23870_foo.c
+aarch64_pr23870_DEPENDENCIES = \
+ gcctestdir/ld gcctestdir/as aarch64_pr23870_main.o \
+ aarch64_pr23870_foo.o aarch64_pr23870_bar.so
+aarch64_pr23870_LDFLAGS = -Wl,-R,. -L. -Wl,-l:aarch64_pr23870_bar.so
+aarch64_pr23870_LDADD = aarch64_pr23870_main.o
+aarch64_pr23870_main.o: aarch64_pr23870_main.S
+ $(COMPILE) -c -o $@ $<
+aarch64_pr23870_foo.o: aarch64_pr23870_foo.c
+ $(COMPILE) -c -o $@ $<
+aarch64_pr23870_bar.o: aarch64_pr23870_bar.c
+ $(COMPILE) -c -fPIC -o $@ $<
+aarch64_pr23870_bar.so: aarch64_pr23870_bar.o
+ $(COMPILE) -shared -o $@ $<
+
+endif DEFAULT_TARGET_AARCH64
+
endif GCC
endif NATIVE_LINKER
diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
index dd6bbfc..a5b109b 100644
--- a/gold/testsuite/Makefile.in
+++ b/gold/testsuite/Makefile.in
@@ -107,7 +107,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
$(am__EXEEXT_31) $(am__EXEEXT_32) $(am__EXEEXT_33) \
$(am__EXEEXT_34) $(am__EXEEXT_35) $(am__EXEEXT_36) \
$(am__EXEEXT_37) $(am__EXEEXT_38) $(am__EXEEXT_39) \
- $(am__EXEEXT_40) $(am__EXEEXT_41)
+ $(am__EXEEXT_40) $(am__EXEEXT_41) $(am__EXEEXT_42)
@NATIVE_OR_CROSS_LINKER_TRUE@am__append_1 = object_unittest \
@NATIVE_OR_CROSS_LINKER_TRUE@ binary_unittest leb128_unittest \
@NATIVE_OR_CROSS_LINKER_TRUE@ overflow_unittest
@@ -898,27 +898,28 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_84 = gnu_property_test.sh
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_85 = gnu_property_test.stdout
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_86 = pr22266
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_87 = aarch64_pr23870
# These tests work with native and cross linkers.
# Test script section order.
-@NATIVE_OR_CROSS_LINKER_TRUE@am__append_87 = script_test_10.sh
-@NATIVE_OR_CROSS_LINKER_TRUE@am__append_88 = script_test_10.stdout
-@NATIVE_OR_CROSS_LINKER_TRUE@am__append_89 = script_test_10
+@NATIVE_OR_CROSS_LINKER_TRUE@am__append_88 = script_test_10.sh
+@NATIVE_OR_CROSS_LINKER_TRUE@am__append_89 = script_test_10.stdout
+@NATIVE_OR_CROSS_LINKER_TRUE@am__append_90 = script_test_10
# These tests work with cross linkers only.
-@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_90 = split_i386.sh
-@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_91 = split_i386_1.stdout split_i386_2.stdout \
+@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_91 = split_i386.sh
+@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_92 = split_i386_1.stdout split_i386_2.stdout \
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_i386_3.stdout split_i386_4.stdout split_i386_r.stdout
-@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_92 = split_i386_1 split_i386_2 split_i386_3 \
+@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_93 = split_i386_1 split_i386_2 split_i386_3 \
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_i386_4 split_i386_r
-@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_93 = split_x86_64.sh \
+@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_94 = split_x86_64.sh \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ bnd_plt_1.sh \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ bnd_ifunc_1.sh \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ bnd_ifunc_2.sh
-@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_94 = split_x86_64_1.stdout \
+@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_95 = split_x86_64_1.stdout \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_x86_64_2.stdout \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_x86_64_3.stdout \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_x86_64_4.stdout \
@@ -926,14 +927,14 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ bnd_plt_1.stdout \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ bnd_ifunc_1.stdout \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ bnd_ifunc_2.stdout
-@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 \
+@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 \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_x86_64_4 split_x86_64_r
-@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_96 = split_x32.sh
-@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_97 = split_x32_1.stdout split_x32_2.stdout \
+@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_97 = split_x32.sh
+@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_98 = split_x32_1.stdout split_x32_2.stdout \
@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_x32_3.stdout split_x32_4.stdout split_x32_r.stdout
-@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_98 = split_x32_1 split_x32_2 split_x32_3 \
+@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_99 = split_x32_1 split_x32_2 split_x32_3 \
@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_x32_4 split_x32_r
@@ -954,7 +955,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
# Check Thumb to ARM farcall veneers
# Check handling of --target1-abs, --target1-rel and --target2 options
-@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_99 = arm_abs_global.sh \
+@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_100 = arm_abs_global.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_branch_in_range.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_branch_out_of_range.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_fix_v4bx.sh \
@@ -977,7 +978,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_target2_got_rel.sh
# The test demonstrates why the constructor of a target object should not access options.
-@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_100 = arm_abs_global.stdout \
+@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_101 = arm_abs_global.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_in_range.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_out_of_range.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ thumb_bl_in_range.stdout \
@@ -1030,7 +1031,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_target2_abs.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_target2_got_rel.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_target_lazy_init
-@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_101 = arm_abs_global \
+@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_102 = arm_abs_global \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_in_range \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_out_of_range \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ thumb_bl_in_range \
@@ -1081,20 +1082,20 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_target2_abs \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_target2_got_rel \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_target_lazy_init
-@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_102 = aarch64_reloc_none.sh \
+@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_103 = aarch64_reloc_none.sh \
@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ aarch64_relocs.sh \
@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ pr21430.sh \
@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ aarch64_tlsdesc.sh
-@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_103 = aarch64_reloc_none.stdout \
+@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_104 = aarch64_reloc_none.stdout \
@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ aarch64_relocs.stdout \
@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ pr21430.stdout \
@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ aarch64_tlsdesc.stdout
-@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_104 = aarch64_reloc_none \
+@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_105 = aarch64_reloc_none \
@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ aarch64_relocs \
@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ pr21430 \
@DEFAULT_TARGET_AARCH64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ aarch64_tlsdesc
-@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_105 = split_s390.sh
-@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_106 = split_s390_z1.stdout split_s390_z2.stdout split_s390_z3.stdout \
+@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_106 = split_s390.sh
+@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_107 = split_s390_z1.stdout split_s390_z2.stdout split_s390_z3.stdout \
@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_s390_z4.stdout split_s390_n1.stdout split_s390_n2.stdout \
@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_s390_a1.stdout split_s390_a2.stdout split_s390_z1_ns.stdout \
@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_s390_z2_ns.stdout split_s390_z3_ns.stdout split_s390_z4_ns.stdout \
@@ -1106,7 +1107,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_s390x_z4_ns.stdout split_s390x_n1_ns.stdout \
@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_s390x_n2_ns.stdout split_s390x_r.stdout
-@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_107 = split_s390_z1 split_s390_z2 split_s390_z3 \
+@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_108 = split_s390_z1 split_s390_z2 split_s390_z3 \
@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_s390_z4 split_s390_n1 split_s390_n2 split_s390_a1 \
@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_s390_a2 split_s390_z1_ns split_s390_z2_ns split_s390_z3_ns \
@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_s390_z4_ns split_s390_n1_ns split_s390_n2_ns split_s390_r \
@@ -1115,10 +1116,10 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_s390x_z1_ns split_s390x_z2_ns split_s390x_z3_ns \
@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_s390x_z4_ns split_s390x_n1_ns split_s390x_n2_ns split_s390x_r
-@DEFAULT_TARGET_X86_64_TRUE@am__append_108 = *.dwo *.dwp
-@DEFAULT_TARGET_X86_64_TRUE@am__append_109 = dwp_test_1.sh \
+@DEFAULT_TARGET_X86_64_TRUE@am__append_109 = *.dwo *.dwp
+@DEFAULT_TARGET_X86_64_TRUE@am__append_110 = dwp_test_1.sh \
@DEFAULT_TARGET_X86_64_TRUE@ dwp_test_2.sh
-@DEFAULT_TARGET_X86_64_TRUE@am__append_110 = dwp_test_1.stdout \
+@DEFAULT_TARGET_X86_64_TRUE@am__append_111 = dwp_test_1.stdout \
@DEFAULT_TARGET_X86_64_TRUE@ dwp_test_2.stdout
subdir = testsuite
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -1350,6 +1351,11 @@ libgoldtest_a_OBJECTS = $(am_libgoldtest_a_OBJECTS)
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_comdat_test_1$(EXEEXT) \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_x86_64_bnd_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_41 = pr22266$(EXEEXT)
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_42 = aarch64_pr23870$(EXEEXT)
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_aarch64_pr23870_OBJECTS = aarch64_pr23870_foo.$(OBJEXT)
+aarch64_pr23870_OBJECTS = $(am_aarch64_pr23870_OBJECTS)
+aarch64_pr23870_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(aarch64_pr23870_LDFLAGS) $(LDFLAGS) -o $@
basic_pic_test_SOURCES = basic_pic_test.c
basic_pic_test_OBJECTS = basic_pic_test.$(OBJEXT)
basic_pic_test_LDADD = $(LDADD)
@@ -2237,16 +2243,16 @@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
am__v_CXXLD_0 = @echo " CXXLD " $@;
am__v_CXXLD_1 =
-SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c basic_pie_test.c \
- basic_static_pic_test.c basic_static_test.c basic_test.c \
- $(binary_test_SOURCES) $(binary_unittest_SOURCES) \
- $(common_test_1_SOURCES) $(common_test_2_SOURCES) \
- $(constructor_static_test_SOURCES) $(constructor_test_SOURCES) \
- $(copy_test_SOURCES) $(copy_test_relro_SOURCES) \
- $(discard_locals_test_SOURCES) $(dynamic_list_2_SOURCES) \
- eh_test.c $(ehdr_start_test_1_SOURCES) \
- $(ehdr_start_test_2_SOURCES) $(ehdr_start_test_3_SOURCES) \
- $(ehdr_start_test_5_SOURCES) \
+SOURCES = $(libgoldtest_a_SOURCES) $(aarch64_pr23870_SOURCES) \
+ basic_pic_test.c basic_pie_test.c basic_static_pic_test.c \
+ basic_static_test.c basic_test.c $(binary_test_SOURCES) \
+ $(binary_unittest_SOURCES) $(common_test_1_SOURCES) \
+ $(common_test_2_SOURCES) $(constructor_static_test_SOURCES) \
+ $(constructor_test_SOURCES) $(copy_test_SOURCES) \
+ $(copy_test_relro_SOURCES) $(discard_locals_test_SOURCES) \
+ $(dynamic_list_2_SOURCES) eh_test.c \
+ $(ehdr_start_test_1_SOURCES) $(ehdr_start_test_2_SOURCES) \
+ $(ehdr_start_test_3_SOURCES) $(ehdr_start_test_5_SOURCES) \
$(exception_same_shared_test_SOURCES) \
$(exception_separate_shared_12_test_SOURCES) \
$(exception_separate_shared_21_test_SOURCES) \
@@ -2796,9 +2802,9 @@ MOSTLYCLEANFILES = *.so *.syms *.stdout *.stderr $(am__append_4) \
$(am__append_34) $(am__append_37) $(am__append_41) \
$(am__append_47) $(am__append_51) $(am__append_52) \
$(am__append_58) $(am__append_78) $(am__append_81) \
- $(am__append_83) $(am__append_89) $(am__append_92) \
- $(am__append_95) $(am__append_98) $(am__append_101) \
- $(am__append_104) $(am__append_107) $(am__append_108)
+ $(am__append_83) $(am__append_90) $(am__append_93) \
+ $(am__append_96) $(am__append_99) $(am__append_102) \
+ $(am__append_105) $(am__append_108) $(am__append_109)
# We will add to these later, for each individual test. Note
# that we add each test under check_SCRIPTS or check_PROGRAMS;
@@ -2808,17 +2814,17 @@ check_SCRIPTS = $(am__append_2) $(am__append_19) $(am__append_23) \
$(am__append_45) $(am__append_49) $(am__append_53) \
$(am__append_56) $(am__append_62) $(am__append_73) \
$(am__append_76) $(am__append_79) $(am__append_84) \
- $(am__append_87) $(am__append_90) $(am__append_93) \
- $(am__append_96) $(am__append_99) $(am__append_102) \
- $(am__append_105) $(am__append_109)
+ $(am__append_88) $(am__append_91) $(am__append_94) \
+ $(am__append_97) $(am__append_100) $(am__append_103) \
+ $(am__append_106) $(am__append_110)
check_DATA = $(am__append_3) $(am__append_20) $(am__append_24) \
$(am__append_30) $(am__append_36) $(am__append_43) \
$(am__append_46) $(am__append_50) $(am__append_54) \
$(am__append_57) $(am__append_63) $(am__append_74) \
$(am__append_77) $(am__append_80) $(am__append_85) \
- $(am__append_88) $(am__append_91) $(am__append_94) \
- $(am__append_97) $(am__append_100) $(am__append_103) \
- $(am__append_106) $(am__append_110)
+ $(am__append_89) $(am__append_92) $(am__append_95) \
+ $(am__append_98) $(am__append_101) $(am__append_104) \
+ $(am__append_107) $(am__append_111)
BUILT_SOURCES = $(am__append_40)
TESTS = $(check_SCRIPTS) $(check_PROGRAMS)
@@ -3367,6 +3373,13 @@ DEPENDENCIES = \
@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
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_test_LDFLAGS = $(exception_test_LDFLAGS) -Wl,-z,bndplt
@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
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_SOURCES = aarch64_pr23870_foo.c
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_DEPENDENCIES = \
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld gcctestdir/as aarch64_pr23870_main.o \
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ aarch64_pr23870_foo.o aarch64_pr23870_bar.so
+
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_LDFLAGS = -Wl,-R,. -L. -Wl,-l:aarch64_pr23870_bar.so
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_LDADD = aarch64_pr23870_main.o
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200
@DEFAULT_TARGET_S390_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200
@DEFAULT_TARGET_X32_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200
@@ -3417,6 +3430,10 @@ libgoldtest.a: $(libgoldtest_a_OBJECTS) $(libgoldtest_a_DEPENDENCIES) $(EXTRA_li
clean-checkPROGRAMS:
-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+aarch64_pr23870$(EXEEXT): $(aarch64_pr23870_OBJECTS) $(aarch64_pr23870_DEPENDENCIES) $(EXTRA_aarch64_pr23870_DEPENDENCIES)
+ @rm -f aarch64_pr23870$(EXEEXT)
+ $(AM_V_CCLD)$(aarch64_pr23870_LINK) $(aarch64_pr23870_OBJECTS) $(aarch64_pr23870_LDADD) $(LIBS)
+
@GCC_FALSE@basic_pic_test$(EXEEXT): $(basic_pic_test_OBJECTS) $(basic_pic_test_DEPENDENCIES) $(EXTRA_basic_pic_test_DEPENDENCIES)
@GCC_FALSE@ @rm -f basic_pic_test$(EXEEXT)
@GCC_FALSE@ $(AM_V_CCLD)$(LINK) $(basic_pic_test_OBJECTS) $(basic_pic_test_LDADD) $(LIBS)
@@ -4691,6 +4708,7 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aarch64_pr23870_foo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basic_pic_test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basic_pie_test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basic_static_pic_test.Po@am__quote@
@@ -7676,6 +7694,13 @@ pr22266.log: pr22266$(EXEEXT)
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+aarch64_pr23870.log: aarch64_pr23870$(EXEEXT)
+ @p='aarch64_pr23870$(EXEEXT)'; \
+ b='aarch64_pr23870'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
.test.log:
@p='$<'; \
$(am__set_b); \
@@ -9463,6 +9488,14 @@ uninstall-am:
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) pr22266_main.o pr22266_ar.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@pr22266_ar.o: pr22266_a.o gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld -r -T $(srcdir)/pr22266_script.t -o $@ pr22266_a.o
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_main.o: aarch64_pr23870_main.S
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -o $@ $<
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_foo.o: aarch64_pr23870_foo.c
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -o $@ $<
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_bar.o: aarch64_pr23870_bar.c
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -fPIC -o $@ $<
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@aarch64_pr23870_bar.so: aarch64_pr23870_bar.o
+@DEFAULT_TARGET_AARCH64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -shared -o $@ $<
@NATIVE_OR_CROSS_LINKER_TRUE@script_test_10.o: script_test_10.s
@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_AS) -o $@ $<
@NATIVE_OR_CROSS_LINKER_TRUE@script_test_10: $(srcdir)/script_test_10.t script_test_10.o gcctestdir/ld
diff --git a/gold/testsuite/aarch64_pr23870_bar.c b/gold/testsuite/aarch64_pr23870_bar.c
new file mode 100644
index 0000000..9e19767
--- /dev/null
+++ b/gold/testsuite/aarch64_pr23870_bar.c
@@ -0,0 +1,6 @@
+void bar (void);
+
+void bar ()
+{
+ return;
+}
diff --git a/gold/testsuite/aarch64_pr23870_foo.c b/gold/testsuite/aarch64_pr23870_foo.c
new file mode 100644
index 0000000..ade3ee6
--- /dev/null
+++ b/gold/testsuite/aarch64_pr23870_foo.c
@@ -0,0 +1,6 @@
+void foo (void (*bar)(void));
+
+void foo (void (*bar)(void))
+{
+ bar();
+}
diff --git a/gold/testsuite/aarch64_pr23870_main.S b/gold/testsuite/aarch64_pr23870_main.S
new file mode 100644
index 0000000..c28d2af
--- /dev/null
+++ b/gold/testsuite/aarch64_pr23870_main.S
@@ -0,0 +1,15 @@
+
+ .text
+ .globl main
+ .type main,#function
+main:
+ stp x29, x30, [sp,#-16]!
+ mov x29, sp
+ movz x0, #:abs_g3:bar
+ movk x0, #:abs_g2_nc:bar
+ movk x0, #:abs_g1_nc:bar
+ movk x0, #:abs_g0_nc:bar
+ add x0, x0, #0x0
+ bl foo
+ ldp x29, x30, [sp],#16
+ ret