summaryrefslogtreecommitdiff
path: root/bfd/elf32-sh.c
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@rr.iij4u.or.jp>2002-11-28 08:37:14 +0000
committerKaz Kojima <kkojima@rr.iij4u.or.jp>2002-11-28 08:37:14 +0000
commitc72cde6d6482ff6c2d7266a0370fc2129b949380 (patch)
treef13db17b1132bbba6033ebdc581dc2dc72e547d5 /bfd/elf32-sh.c
parent87478dfed0d11f4b752e5f095426ecd7c24407d4 (diff)
downloadgdb-c72cde6d6482ff6c2d7266a0370fc2129b949380.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/elf32-sh.c')
-rw-r--r--bfd/elf32-sh.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index f52245bcc34..c7c078ceaf4 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -4753,6 +4753,13 @@ sh_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| ((input_section->flags & SEC_DEBUGGING) != 0
&& (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_DYNAMIC) != 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))
|| (sec->output_section == NULL
&& (sh_elf_hash_entry (h)->tls_type == GOT_TLS_IE
|| sh_elf_hash_entry (h)->tls_type == GOT_TLS_GD)))