/* Renesas RX specific support for 32-bit ELF.
- Copyright (C) 2008, 2009
+ Copyright (C) 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
\f
static bfd_vma
get_symbol_value (const char * name,
- bfd_reloc_status_type * stat,
+ bfd_reloc_status_type * status,
struct bfd_link_info * info,
bfd * input_bfd,
asection * input_section,
if (h == NULL
|| (h->type != bfd_link_hash_defined
&& h->type != bfd_link_hash_defweak))
- * stat = info->callbacks->undefined_symbol
+ * status = info->callbacks->undefined_symbol
(info, name, input_bfd, input_section, offset, TRUE);
else
value = (h->u.def.value
}
static bfd_vma
-get_gp (bfd_reloc_status_type * stat,
+get_gp (bfd_reloc_status_type * status,
struct bfd_link_info * info,
bfd * abfd,
asection * sec,
if (!cached)
{
- cached_value = get_symbol_value ("__gp", stat, info, abfd, sec, offset);
+ cached_value = get_symbol_value ("__gp", status, info, abfd, sec, offset);
cached = TRUE;
}
return cached_value;
}
static bfd_vma
-get_romstart (bfd_reloc_status_type * stat,
+get_romstart (bfd_reloc_status_type * status,
struct bfd_link_info * info,
bfd * abfd,
asection * sec,
if (!cached)
{
- cached_value = get_symbol_value ("_start", stat, info, abfd, sec, offset);
+ cached_value = get_symbol_value ("_start", status, info, abfd, sec, offset);
cached = TRUE;
}
return cached_value;
}
static bfd_vma
-get_ramstart (bfd_reloc_status_type * stat,
+get_ramstart (bfd_reloc_status_type * status,
struct bfd_link_info * info,
bfd * abfd,
asection * sec,
if (!cached)
{
- cached_value = get_symbol_value ("__datastart", stat, info, abfd, sec, offset);
+ cached_value = get_symbol_value ("__datastart", status, info, abfd, sec, offset);
cached = TRUE;
}
return cached_value;
struct elf_link_hash_entry ** sym_hashes;
Elf_Internal_Rela * rel;
Elf_Internal_Rela * relend;
- bfd * dynobj;
- asection * splt;
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
relend = relocs + input_section->reloc_count;
-
- dynobj = elf_hash_table (info)->dynobj;
- splt = NULL;
- if (dynobj != NULL)
- splt = bfd_get_section_by_name (dynobj, ".plt");
-
for (rel = relocs; rel < relend; rel ++)
{
reloc_howto_type * howto;
bfd_byte * contents;
Elf_Internal_Rela * irel;
Elf_Internal_Rela * irelend;
- Elf_Internal_Rela * irelalign;
Elf_Internal_Sym * isym;
Elf_Internal_Sym * isymend;
bfd_vma toaddr;
/* The deletion must stop at the next alignment boundary, if
ALIGNMENT_REL is non-NULL. */
- irelalign = NULL;
toaddr = sec->size;
if (alignment_rel)
toaddr = alignment_rel->r_offset;
rx_offset_for_reloc (bfd * abfd,
Elf_Internal_Rela * rel,
Elf_Internal_Shdr * symtab_hdr,
- Elf_External_Sym_Shndx * shndx_buf,
+ Elf_External_Sym_Shndx * shndx_buf ATTRIBUTE_UNUSED,
Elf_Internal_Sym * intsyms,
Elf_Internal_Rela ** lrel,
bfd * input_bfd,
{
/* A local symbol. */
Elf_Internal_Sym *isym;
- Elf_External_Sym_Shndx *shndx;
asection *ssec;
isym = intsyms + ELF32_R_SYM (rel->r_info);
ssec = bfd_section_from_elf_index (abfd,
isym->st_shndx);
- shndx = shndx_buf + (shndx_buf ? ELF32_R_SYM (rel->r_info) : 0);
-
/* Initial symbol value. */
symval = isym->st_value;
Elf_External_Sym_Shndx * shndx_buf = NULL;
bfd_vma pc;
bfd_vma sec_start;
- bfd_vma sec_end;
bfd_vma symval = 0;
int pcrel = 0;
int code = 0;
shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
sec_start = sec->output_section->vma + sec->output_offset;
- sec_end = sec->output_section->vma + sec->output_offset + sec->size;
/* Get the section contents. */
if (elf_section_data (sec)->this_hdr.contents != NULL)
else if (code == 1 && symval/scale <= 31
/* Decodable bits. */
&& (insn[0] & 0xcc) == 0xcc
- /* width */
+ /* Width. */
&& (insn[0] & 0x30) != 3
- /* register MSBs */
+ /* Register MSBs. */
&& (insn[1] & 0x88) == 0x00)
{
int newrel = 0;