PARAMS ((bfd *, boolean));
static boolean v850_elf_set_private_flags
PARAMS ((bfd *, flagword));
-static boolean v850_elf_copy_private_bfd_data
- PARAMS ((bfd *, bfd *));
static boolean v850_elf_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
static boolean v850_elf_print_private_bfd_data
PARAMS ((bfd *, PTR));
static boolean v850_elf_section_from_bfd_section
- PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *, int *));
+ PARAMS ((bfd *, asection *, int *));
static void v850_elf_symbol_processing
PARAMS ((bfd *, asymbol *));
static boolean v850_elf_add_symbol_hook
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = (sec->output_section->vma
- + sec->output_offset
- + sym->st_value);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
#if 0
{
char * name;
}
else
{
- if (!(elf_bad_symtab (abfd)
- && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
- && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
- && sym->st_shndx != SHN_COMMON))
- {
- return bfd_section_from_elf_index (abfd, sym->st_shndx);
- }
- }
+ return bfd_section_from_elf_index (abfd, sym->st_shndx);
+ }
+
return NULL;
}
return true;
}
-/* Copy backend specific data from one object module to another. */
-
-static boolean
-v850_elf_copy_private_bfd_data (ibfd, obfd)
- bfd * ibfd;
- bfd * obfd;
-{
- if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return true;
-
- BFD_ASSERT (!elf_flags_init (obfd)
- || (elf_elfheader (obfd)->e_flags
- == elf_elfheader (ibfd)->e_flags));
-
- elf_gp (obfd) = elf_gp (ibfd);
- elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
- elf_flags_init (obfd) = true;
-
- return true;
-}
-
/* Merge backend specific data from an object file
to the output object file when linking. */
static boolean
corresponding ELF section index. */
static boolean
-v850_elf_section_from_bfd_section (abfd, hdr, sec, retval)
+v850_elf_section_from_bfd_section (abfd, sec, retval)
bfd * abfd ATTRIBUTE_UNUSED;
- Elf32_Internal_Shdr * hdr ATTRIBUTE_UNUSED;
asection * sec;
int * retval;
{
asymbol * asym;
{
elf_symbol_type * elfsym = (elf_symbol_type *) asym;
- unsigned short index;
+ unsigned int indx;
- index = elfsym->internal_elf_sym.st_shndx;
+ indx = elfsym->internal_elf_sym.st_shndx;
/* If the section index is an "ordinary" index, then it may
refer to a v850 specific section created by the assembler.
FIXME: Should we alter the st_shndx field as well ? */
- if (index < elf_elfheader(abfd)[0].e_shnum)
- switch (elf_elfsections(abfd)[index]->sh_type)
+ if (indx < elf_numsections (abfd))
+ switch (elf_elfsections(abfd)[indx]->sh_type)
{
case SHT_V850_SCOMMON:
- index = SHN_V850_SCOMMON;
+ indx = SHN_V850_SCOMMON;
break;
case SHT_V850_TCOMMON:
- index = SHN_V850_TCOMMON;
+ indx = SHN_V850_TCOMMON;
break;
case SHT_V850_ZCOMMON:
- index = SHN_V850_ZCOMMON;
+ indx = SHN_V850_ZCOMMON;
break;
default:
break;
}
- switch (index)
+ switch (indx)
{
case SHN_V850_SCOMMON:
if (v850_elf_scom_section.name == NULL)
asection ** secp;
bfd_vma * valp;
{
- int index = sym->st_shndx;
+ unsigned int indx = sym->st_shndx;
/* If the section index is an "ordinary" index, then it may
refer to a v850 specific section created by the assembler.
FIXME: Should we alter the st_shndx field as well ? */
- if (index < elf_elfheader(abfd)[0].e_shnum)
- switch (elf_elfsections(abfd)[index]->sh_type)
+ if (indx < elf_numsections (abfd))
+ switch (elf_elfsections(abfd)[indx]->sh_type)
{
case SHT_V850_SCOMMON:
- index = SHN_V850_SCOMMON;
+ indx = SHN_V850_SCOMMON;
break;
case SHT_V850_TCOMMON:
- index = SHN_V850_TCOMMON;
+ indx = SHN_V850_TCOMMON;
break;
case SHT_V850_ZCOMMON:
- index = SHN_V850_ZCOMMON;
+ indx = SHN_V850_ZCOMMON;
break;
default:
break;
}
- switch (index)
+ switch (indx)
{
case SHN_V850_SCOMMON:
*secp = bfd_make_section_old_way (abfd, ".scommon");
#define bfd_elf32_bfd_is_local_label_name v850_elf_is_local_label_name
#define bfd_elf32_bfd_reloc_type_lookup v850_elf_reloc_type_lookup
-#define bfd_elf32_bfd_copy_private_bfd_data v850_elf_copy_private_bfd_data
#define bfd_elf32_bfd_merge_private_bfd_data v850_elf_merge_private_bfd_data
#define bfd_elf32_bfd_set_private_flags v850_elf_set_private_flags
#define bfd_elf32_bfd_print_private_bfd_data v850_elf_print_private_bfd_data