diff options
Diffstat (limited to 'binutils-2.25/bfd/elf32-msp430.c')
-rw-r--r-- | binutils-2.25/bfd/elf32-msp430.c | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/binutils-2.25/bfd/elf32-msp430.c b/binutils-2.25/bfd/elf32-msp430.c index 2f7a3dad..2f55c538 100644 --- a/binutils-2.25/bfd/elf32-msp430.c +++ b/binutils-2.25/bfd/elf32-msp430.c @@ -1,5 +1,5 @@ /* MSP430-specific support for 32-bit ELF - Copyright (C) 2002-2013 Free Software Foundation, Inc. + Copyright (C) 2002-2014 Free Software Foundation, Inc. Contributed by Dmitry Diky <diwil@mail.ru> This file is part of BFD, the Binary File Descriptor library. @@ -549,10 +549,10 @@ static const struct msp430_reloc_map msp430x_reloc_map[] = static inline bfd_boolean uses_msp430x_relocs (bfd * abfd) { - extern const bfd_target bfd_elf32_msp430_ti_vec; + extern const bfd_target msp430_elf32_ti_vec; return bfd_get_mach (abfd) == bfd_mach_msp430x - || abfd->xvec == & bfd_elf32_msp430_ti_vec; + || abfd->xvec == & msp430_elf32_ti_vec; } static reloc_howto_type * @@ -1276,12 +1276,12 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, } else { - bfd_boolean unresolved_reloc, warned; + bfd_boolean unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, h, sec, relocation, - unresolved_reloc, warned); + unresolved_reloc, warned, ignored); name = h->root.root.string; } @@ -1582,14 +1582,15 @@ msp430_elf_relax_adjust_locals (bfd * abfd, asection * sec, bfd_vma addr, irelend = irel + sec->reloc_count; symtab_hdr = & elf_tdata (abfd)->symtab_hdr; isym = (Elf_Internal_Sym *) symtab_hdr->contents; - + for (;irel < irelend; irel++) { - int sidx = ELF32_R_SYM(irel->r_info); + unsigned int sidx = ELF32_R_SYM(irel->r_info); Elf_Internal_Sym *lsym = isym + sidx; - + /* Adjust symbols referenced by .sec+0xXX */ - if (irel->r_addend > addr && irel->r_addend < toaddr + if (irel->r_addend > addr && irel->r_addend < toaddr + && sidx < symtab_hdr->sh_info && lsym->st_shndx == sec_shndx) irel->r_addend -= count; } @@ -2392,17 +2393,6 @@ elf32_msp430_merge_private_bfd_data (bfd * ibfd, bfd * obfd) return elf32_msp430_merge_mspabi_attributes (ibfd, obfd); } -/* Copy backend specific data from one object module to another. */ - -static bfd_boolean -elf32_msp430_copy_private_bfd_data (bfd *ibfd, bfd *obfd) -{ - /* Copy object attributes. */ - _bfd_elf_copy_obj_attributes (ibfd, obfd); - - return TRUE; -} - static bfd_boolean msp430_elf_is_target_special_symbol (bfd *abfd, asymbol *sym) { @@ -2439,7 +2429,6 @@ msp430_elf_is_target_special_symbol (bfd *abfd, asymbol *sym) #define elf_backend_obj_attrs_handle_unknown elf32_msp430_obj_attrs_handle_unknown #undef elf_backend_obj_attrs_arg_type #define elf_backend_obj_attrs_arg_type elf32_msp430_obj_attrs_arg_type -#define bfd_elf32_bfd_copy_private_bfd_data elf32_msp430_copy_private_bfd_data #define bfd_elf32_bfd_merge_private_bfd_data elf32_msp430_merge_private_bfd_data #define ELF_ARCH bfd_arch_msp430 @@ -2448,7 +2437,7 @@ msp430_elf_is_target_special_symbol (bfd *abfd, asymbol *sym) #define ELF_MAXPAGESIZE 4 #define ELF_OSABI ELFOSABI_STANDALONE -#define TARGET_LITTLE_SYM bfd_elf32_msp430_vec +#define TARGET_LITTLE_SYM msp430_elf32_vec #define TARGET_LITTLE_NAME "elf32-msp430" #define elf_info_to_howto msp430_info_to_howto_rela @@ -2458,7 +2447,6 @@ msp430_elf_is_target_special_symbol (bfd *abfd, asymbol *sym) #define elf_backend_can_gc_sections 1 #define elf_backend_final_write_processing bfd_elf_msp430_final_write_processing #define elf_backend_object_p elf32_msp430_object_p -#define elf_backend_post_process_headers _bfd_elf_set_osabi #define bfd_elf32_bfd_relax_section msp430_elf_relax_section #define bfd_elf32_bfd_is_target_special_symbol msp430_elf_is_target_special_symbol @@ -2469,7 +2457,7 @@ msp430_elf_is_target_special_symbol (bfd *abfd, asymbol *sym) /* The TI compiler sets the OSABI field to ELFOSABI_NONE. */ #undef TARGET_LITTLE_SYM -#define TARGET_LITTLE_SYM bfd_elf32_msp430_ti_vec +#define TARGET_LITTLE_SYM msp430_elf32_ti_vec #undef elf32_bed #define elf32_bed elf32_msp430_ti_bed |