X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felf32-msp430.c;h=94052fa0916a712b42ed060fa74fa4f48d014378;hb=5b677558bc6c7b2477bb33c709e6017e68e7ae8c;hp=4d50cabbce3d561b5958212ae7a435f8a6964c07;hpb=1b7868733d45220e63b72a1814f30e090f761821;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c index 4d50cabbce..94052fa091 100644 --- a/bfd/elf32-msp430.c +++ b/bfd/elf32-msp430.c @@ -1,5 +1,5 @@ /* MSP430-specific support for 32-bit ELF - Copyright (C) 2002-2015 Free Software Foundation, Inc. + Copyright (C) 2002-2016 Free Software Foundation, Inc. Contributed by Dmitry Diky This file is part of BFD, the Binary File Descriptor library. @@ -672,7 +672,7 @@ elf32_msp430_check_relocs (bfd * abfd, struct bfd_link_info * info, const Elf_Internal_Rela *rel; const Elf_Internal_Rela *rel_end; - if (info->relocatable) + if (bfd_link_relocatable (info)) return TRUE; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -1328,7 +1328,7 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, rel, 1, relend, howto, 0, contents); - if (info->relocatable) + if (bfd_link_relocatable (info)) continue; r = msp430_final_link_relocate (howto, input_bfd, input_section, @@ -1341,15 +1341,14 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, switch (r) { case bfd_reloc_overflow: - r = info->callbacks->reloc_overflow + (*info->callbacks->reloc_overflow) (info, (h ? &h->root : NULL), name, howto->name, - (bfd_vma) 0, input_bfd, input_section, - rel->r_offset); + (bfd_vma) 0, input_bfd, input_section, rel->r_offset); break; case bfd_reloc_undefined: - r = info->callbacks->undefined_symbol - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (*info->callbacks->undefined_symbol) + (info, name, input_bfd, input_section, rel->r_offset, TRUE); break; case bfd_reloc_outofrange: @@ -1370,11 +1369,8 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, } if (msg) - r = info->callbacks->warning - (info, msg, name, input_bfd, input_section, rel->r_offset); - - if (!r) - return FALSE; + (*info->callbacks->warning) (info, msg, name, input_bfd, + input_section, rel->r_offset); } } @@ -1846,7 +1842,7 @@ msp430_elf_relax_section (bfd * abfd, asection * sec, /* We don't have to do anything for a relocatable link, if this section does not have relocs, or if this is not a code section. */ - if (link_info->relocatable + if (bfd_link_relocatable (link_info) || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) return TRUE; @@ -2629,4 +2625,7 @@ static const struct bfd_elf_special_section msp430_ti_elf_special_sections[] = { NULL, 0, 0, 0, 0 } }; +#undef elf_backend_special_sections +#define elf_backend_special_sections msp430_ti_elf_special_sections + #include "elf32-target.h"