X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felf32-d10v.c;h=246e5f51650c4b3f0f8049f9bc5d8b0ddc34ed4c;hb=545fd46b6bb24535905e4bc69b91537fee065bf3;hp=57b2d3b0a24659c48bc34b08ff57f59cbc1aa491;hpb=d17e0c6e9a7d377e81dfbd6a8b0fd42fe7b502db;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c index 57b2d3b0a2..246e5f5165 100644 --- a/bfd/elf32-d10v.c +++ b/bfd/elf32-d10v.c @@ -1,6 +1,6 @@ /* D10V-specific support for 32-bit ELF Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007 Free Software Foundation, Inc. + 2007, 2010, 2012 Free Software Foundation, Inc. Contributed by Martin Hunt (hunt@cygnus.com). This file is part of BFD, the Binary File Descriptor library. @@ -262,7 +262,7 @@ elf32_d10v_check_relocs (bfd *abfd, const Elf_Internal_Rela *relocs) { Elf_Internal_Shdr *symtab_hdr; - struct elf_link_hash_entry **sym_hashes, **sym_hashes_end; + struct elf_link_hash_entry **sym_hashes; const Elf_Internal_Rela *rel; const Elf_Internal_Rela *rel_end; @@ -271,9 +271,6 @@ elf32_d10v_check_relocs (bfd *abfd, symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); - sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym); - if (!elf_bad_symtab (abfd)) - sym_hashes_end -= symtab_hdr->sh_info; rel_end = relocs + sec->reloc_count; for (rel = relocs; rel < rel_end; rel++) @@ -466,16 +463,9 @@ elf32_d10v_relocate_section (bfd *output_bfd, unresolved_reloc, warned); } - if (sec != NULL && elf_discarded_section (sec)) - { - /* For relocs against symbols from removed linkonce sections, - or sections discarded by a linker script, we just want the - section contents zeroed. Avoid any special processing. */ - _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset); - rel->r_info = 0; - rel->r_addend = 0; - continue; - } + if (sec != NULL && discarded_section (sec)) + RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, + rel, 1, relend, howto, 0, contents); if (info->relocatable) continue;