aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-bfin.c
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/elf32-bfin.c
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/elf32-bfin.c')
-rw-r--r--bfd/elf32-bfin.c11
1 files changed, 9 insertions, 2 deletions
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);