diff options
Diffstat (limited to 'bfd/elfxx-sparc.c')
-rw-r--r-- | bfd/elfxx-sparc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c index 77ffbfe..3b64aca 100644 --- a/bfd/elfxx-sparc.c +++ b/bfd/elfxx-sparc.c @@ -2755,8 +2755,13 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* r_symndx will be zero only for relocs against symbols from removed linkonce sections, or sections discarded by a linker script. */ - if (r_symndx == 0 - || (input_section->flags & SEC_ALLOC) == 0) + if (r_symndx == 0) + { + _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset); + break; + } + + if ((input_section->flags & SEC_ALLOC) == 0) break; if ((info->shared |