aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-06-28 15:55:22 +0100
committerNick Clifton <nickc@redhat.com>2016-06-28 15:55:22 +0100
commit1b857aeed3f5cfddc4b5b1f5836ccd341aeb9f5d (patch)
treec28844672924e63b06760f863c0402fd35a7780f /bfd
parent50c901ede915776db734ea77225ebd3558fab2f6 (diff)
downloadgdb-1b857aeed3f5cfddc4b5b1f5836ccd341aeb9f5d.zip
gdb-1b857aeed3f5cfddc4b5b1f5836ccd341aeb9f5d.tar.gz
gdb-1b857aeed3f5cfddc4b5b1f5836ccd341aeb9f5d.tar.bz2
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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog3
-rw-r--r--bfd/elf32-bfin.c11
2 files changed, 12 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 68d81c0..8ad7d0d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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.
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index d7d096a..9c5802a 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -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);