/* FR30-specific support for 32-bit ELF.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
#include "sysdep.h"
#include "bfd.h"
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_FR30_8", /* name */
- TRUE, /* partial_inplace */
+ FALSE, /* partial_inplace */
0x0000, /* src_mask */
0x0ff0, /* dst_mask */
FALSE), /* pcrel_offset */
complain_overflow_bitfield, /* complain_on_overflow */
fr30_elf_i20_reloc, /* special_function */
"R_FR30_20", /* name */
- TRUE, /* partial_inplace */
+ FALSE, /* partial_inplace */
0x00000000, /* src_mask */
0x00f0ffff, /* dst_mask */
FALSE), /* pcrel_offset */
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_FR30_32", /* name */
- TRUE, /* partial_inplace */
+ FALSE, /* partial_inplace */
0x00000000, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
complain_overflow_bitfield, /* complain_on_overflow */
fr30_elf_i32_reloc, /* special_function */
"R_FR30_48", /* name */
- TRUE, /* partial_inplace */
+ FALSE, /* partial_inplace */
0x00000000, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
complain_overflow_unsigned, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_FR30_6_IN_4", /* name */
- TRUE, /* partial_inplace */
+ FALSE, /* partial_inplace */
0x0000, /* src_mask */
0x00f0, /* dst_mask */
FALSE), /* pcrel_offset */
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc,/* special_function */
"R_FR30_8_IN_8", /* name */
- TRUE, /* partial_inplace */
+ FALSE, /* partial_inplace */
0x0000, /* src_mask */
0x0ff0, /* dst_mask */
FALSE), /* pcrel_offset */
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc,/* special_function */
"R_FR30_9_IN_8", /* name */
- TRUE, /* partial_inplace */
+ FALSE, /* partial_inplace */
0x0000, /* src_mask */
0x0ff0, /* dst_mask */
FALSE), /* pcrel_offset */
complain_overflow_signed, /* complain_on_overflow */
bfd_elf_generic_reloc,/* special_function */
"R_FR30_10_IN_8", /* name */
- TRUE, /* partial_inplace */
+ FALSE, /* partial_inplace */
0x0000, /* src_mask */
0x0ff0, /* dst_mask */
FALSE), /* pcrel_offset */
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;
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++)
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_FR30_GNU_VTENTRY:
- if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ BFD_ASSERT (h != NULL);
+ if (h != NULL
+ && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
return FALSE;
break;
}