summaryrefslogtreecommitdiff
path: root/bfd/elf64-sh64.c
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@rr.iij4u.or.jp>2002-11-28 08:37:15 +0000
committerKaz Kojima <kkojima@rr.iij4u.or.jp>2002-11-28 08:37:15 +0000
commit1673f39e37c65c9e2b3b57ff67712c449b2e9426 (patch)
tree9627fb66652f9abeeb7c0b41468a8ca1b7340117 /bfd/elf64-sh64.c
parenta25b7ac9c2f4eedbffbd3441dff17fbc3a0e2880 (diff)
downloadbinutils-redhat-1673f39e37c65c9e2b3b57ff67712c449b2e9426.tar.gz
* elf32-sh.c (sh_elf_relocate_section): Don't complain about
unresolved debugging relocs in dynamic applications. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * ld-sh/refdbg-0-dso.d: New test. * ld-sh/refdbg-1.d: Likewise. * ld-sh/refdbg.s: Likewise. * ld-sh/refdbglib.s: Likewise.
Diffstat (limited to 'bfd/elf64-sh64.c')
-rw-r--r--bfd/elf64-sh64.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
index da02505d5c..590c13369c 100644
--- a/bfd/elf64-sh64.c
+++ b/bfd/elf64-sh64.c
@@ -1680,7 +1680,14 @@ sh_elf64_relocate_section (output_bfd, info, input_bfd, input_section,
sections against symbols defined externally
in shared libraries. We can't do anything
with them here. */
- || (input_section->flags & SEC_DEBUGGING) != 0)))
+ || (input_section->flags & SEC_DEBUGGING) != 0))
+ /* Dynamic relocs are not propagated for SEC_DEBUGGING
+ sections because such sections are not SEC_ALLOC and
+ thus ld.so will not process them. */
+ || (sec->output_section == NULL
+ && ((input_section->flags & SEC_DEBUGGING) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0)))
relocation = 0;
else if (sec->output_section == NULL)
{