aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-d10v.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-d10v.c')
-rw-r--r--bfd/elf32-d10v.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c
index e5d546a..8d7cd94 100644
--- a/bfd/elf32-d10v.c
+++ b/bfd/elf32-d10v.c
@@ -469,6 +469,16 @@ elf32_d10v_relocate_section (bfd *output_bfd,
unresolved_reloc, warned);
}
+ if (r_symndx == 0)
+ {
+ /* r_symndx will be zero only for relocs against symbols from
+ removed linkonce sections, or sections discarded by a linker
+ script. For these relocs, we just want the section contents
+ zeroed. Avoid any special processing. */
+ _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
+ continue;
+ }
+
if (h != NULL)
name = h->root.root.string;
else