diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-sh.c | 7 | ||||
-rw-r--r-- | bfd/elf64-sh64.c | 9 |
3 files changed, 21 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1823e3a..f0b8dc6 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp> + + * 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. + 2002-11-26 Alan Modra <amodra@bigpond.net.au> * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs. diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index f52245b..c7c078c 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))) diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c index da02505..590c133 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) { |