Fix more linker testsuite failures.

bfin	* elf32-bfin.c (bfin_adjust_dynamic_symbol): Fail if a COPY reloc
	is needed.

ld	* testsuite/ld-elf/comm-data.exp: Expect comm-data2 test to fail
	for bfin.
	* testsuite/ld-elf/elf.exp: Expect pr14170 and symbolic function
	tests to fail for bfin.
	* testsuite/ld-elf/endsym.d: Expect to fail with cr16, crx, dlx,
	nds32 and visium.
	* testsuite/ld-elf/var1.d: Expect to fail with d30v, dlx, ft32 and
	microblaze.
	* testsuite/ld-pe/pe.exp: Expect foreign symbol test to fail for
	mcore-pe.
This commit is contained in:
Nick Clifton 2016-06-28 15:55:22 +01:00
parent 50c901ede9
commit 1b857aeed3
8 changed files with 56 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2016-06-28 Nick Clifton <nickc@redhat.com>
* elf32-bfin.c (bfin_adjust_dynamic_symbol): Fail if a COPY reloc
is needed.
* elf32-arm.c (elf32_arm_backend_symbol_processing): New
function. Marks mapping symbols in object files as precious, so
that strip will not remove them.

View File

@ -5252,7 +5252,8 @@ bfin_adjust_dynamic_symbol (struct bfd_link_info *info,
s = bfd_get_linker_section (dynobj, ".dynbss");
BFD_ASSERT (s != NULL);
/* We must generate a R_68K_COPY reloc to tell the dynamic linker to
#if 0 /* Bfin does not currently have a COPY reloc. */
/* We must generate a R_BFIN_COPY reloc to tell the dynamic linker to
copy the initial value out of the dynamic object and into the
runtime process image. We need to remember the offset into the
.rela.bss section we are going to use. */
@ -5265,7 +5266,13 @@ bfin_adjust_dynamic_symbol (struct bfd_link_info *info,
srel->size += sizeof (Elf32_External_Rela);
h->needs_copy = 1;
}
#else
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
{
(*_bfd_error_handler) (_("the bfin target does not currently support the generation of copy relocations"),
return FALSE;
}
#endif
/* We need to figure out the alignment required for this symbol. I
have no idea how ELF linkers handle this. */
power_of_two = bfd_log2 (h->size);

View File

@ -1,3 +1,30 @@
2016-06-28 Nick Clifton <nickc@redhat.com>
* testsuite/ld-elf/comm-data.exp: Expect comm-data2 test to fail
for bfin.
* testsuite/ld-elf/elf.exp: Expect pr14170 and symbolic function
tests to fail for bfin.
* testsuite/ld-elf/endsym.d: Expect to fail with cr16, crx, dlx,
nds32 and visium.
* testsuite/ld-elf/var1.d: Expect to fail with d30v, dlx, ft32 and
microblaze.
* testsuite/ld-pe/pe.exp: Expect foreign symbol test to fail for
mcore-pe.
2016-06-28 Nick Clifton <nickc@redhat.com>
* testsuite/ld-elf/merge.d: Add m68hc11 to list of targets that
expect to fail this test.
* testsuite/ld-scripts/overlay-size.d: Skip the entire test for
RX.
* testsuite/ld-scripts/rgn-at10.d: No longer expect this test to
fail for the RX.
* testsuite/ld-scripts/rgn-at11.d: Likewise.
* testsuite/ld-scripts/rgn-at2.d: Likewise.
* testsuite/ld-scripts/rgn-at6.d: Likewise.
* testsuite/ld-scripts/rgn-at7.d: Likewise.
* testsuite/ld-scripts/rgn-at8.d: Likewise.
2016-06-28 James Clarke <jrtc27@jrtc27.com>
* testsuite/ld-elf/symbolic-func.r: Allow non-zero offsets from

View File

@ -68,6 +68,9 @@ if [istarget "*-*-hpux*"] {
append AFLAGS " --defsym HPUX=1"
}
# bfin does not currently support copy relocs.
setup_xfail "bfin-*-*"
setup_xfail "arm*-*-*" "ld/13802"
# List targets here that keep copy relocs rather than eliminating

View File

@ -70,6 +70,10 @@ if { ![istarget hppa64*-hpux*] } {
run_ld_link_tests {
{"Build shared library for pr14170"
"-shared" "" "" "pr14170b.s" {} "pr14170.so" }
}
# bfin does not currently support copy relocs.
setup_xfail "bfin-*-*"
run_ld_link_tests {
{"PR ld/14170"
"tmpdir/pr14170a.o tmpdir/pr14170.so" "" "" "pr14170c.s"
{ } "pr14170" }
@ -103,6 +107,10 @@ if { [check_shared_lib_support] } then {
{"Build pr17068b.a"
"" "" ""
{pr17068b.s pr17068e.s} {} "pr17068b.a"}
}
# bfin does not currently support copy relocs.
setup_xfail "bfin-*-*"
run_ld_link_tests {
{"pr17068 link --as-needed lib in group"
"--as-needed" "--start-group tmpdir/pr17068a.a tmpdir/pr17068.so tmpdir/pr17068b.a --end-group" ""
{start.s pr17068.s} {} "pr17068"}
@ -111,6 +119,8 @@ if { [check_shared_lib_support] } then {
setup_xfail "tic6x-*-*"
# Fails on MIPS because ABI trickery means that a NULL reloc is also emitted.
setup_xfail "mips*-*-*"
# Fails on bfin because relocations are not created.
setup_xfail "bfin-*-*"
run_ld_link_tests {
{"-Bsymbolic-functions"
"-shared -Bsymbolic-functions" "" ""

View File

@ -3,7 +3,7 @@
#ld: --sort-common
#nm: -n
#notarget: hppa*-*-hpux*
#xfail: m68hc1*-* xgate-*
#xfail: m68hc1*-* xgate-* cr16-*-* crx-*-* dlx-*-* nds32*-*-* visium-*-*
#...
.* end

View File

@ -1,5 +1,6 @@
#ld: $srcdir/$subdir/var1.t --sort-section name
#nm: -n
#xfail: d30v-*-* dlx-*-* ft32-*-* microblaze-*-*
#...
[0-9a-f]* D var1

View File

@ -101,4 +101,6 @@ set foreign_sym_test {
{{nm -C non-c-lang-syms.d}} "non-c-lang-syms.x"}
}
# MCore rearranges symbol order.
setup_xfail mcore-*-pe
run_ld_link_tests $foreign_sym_test