Ignore:
Timestamp:
Feb 6, 2017, 1:00:00 PM (8 years ago)
Author:
Silvan Scherrer
Message:

binutils: update trunk to version 2.27

Location:
binutils/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • binutils/trunk

  • TabularUnified binutils/trunk/bfd/coff-sh.c

    r970 r1973  
    11/* BFD back-end for Renesas Super-H COFF binaries.
    2    Copyright (C) 1993-2014 Free Software Foundation, Inc.
     2   Copyright (C) 1993-2016 Free Software Foundation, Inc.
    33   Contributed by Cygnus Support.
    44   Written by Steve Chamberlain, <sac@cygnus.com>.
     
    531531/* This is the same as the macro in coffcode.h, except that it copies
    532532   r_offset into reloc_entry->addend for some relocs.  */
    533 #define CALC_ADDEND(abfd, ptr, reloc, cache_ptr)                \
    534   {                                                             \
    535     coff_symbol_type *coffsym = (coff_symbol_type *) NULL;      \
    536     if (ptr && bfd_asymbol_bfd (ptr) != abfd)                   \
    537       coffsym = (obj_symbols (abfd)                             \
    538                  + (cache_ptr->sym_ptr_ptr - symbols));         \
    539     else if (ptr)                                               \
    540       coffsym = coff_symbol_from (abfd, ptr);                   \
    541     if (coffsym != (coff_symbol_type *) NULL                    \
    542         && coffsym->native->u.syment.n_scnum == 0)              \
    543       cache_ptr->addend = 0;                                    \
    544     else if (ptr && bfd_asymbol_bfd (ptr) == abfd               \
    545              && ptr->section != (asection *) NULL)              \
    546       cache_ptr->addend = - (ptr->section->vma + ptr->value);   \
    547     else                                                        \
    548       cache_ptr->addend = 0;                                    \
     533#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr)                \
     534  {                                                             \
     535    coff_symbol_type *coffsym = (coff_symbol_type *) NULL;      \
     536    if (ptr && bfd_asymbol_bfd (ptr) != abfd)                   \
     537      coffsym = (obj_symbols (abfd)                             \
     538                 + (cache_ptr->sym_ptr_ptr - symbols));         \
     539    else if (ptr)                                               \
     540      coffsym = coff_symbol_from (ptr);                         \
     541    if (coffsym != (coff_symbol_type *) NULL                    \
     542        && coffsym->native->u.syment.n_scnum == 0)              \
     543      cache_ptr->addend = 0;                                    \
     544    else if (ptr && bfd_asymbol_bfd (ptr) == abfd               \
     545             && ptr->section != (asection *) NULL)              \
     546      cache_ptr->addend = - (ptr->section->vma + ptr->value);   \
     547    else                                                        \
     548      cache_ptr->addend = 0;                                    \
    549549    if ((reloc).r_type == R_SH_SWITCH8                          \
    550550        || (reloc).r_type == R_SH_SWITCH16                      \
     
    715715  *again = FALSE;
    716716
    717   if (link_info->relocatable
     717  if (bfd_link_relocatable (link_info)
    718718      || (sec->flags & SEC_RELOC) == 0
    719719      || sec->reloc_count == 0)
     
    23302330    {
    23312331      sh_opcodes[0xf].minor_opcodes = sh_dsp_opcodef;
    2332       sh_opcodes[0xf].count = sizeof sh_dsp_opcodef / sizeof sh_dsp_opcodef;
     2332      sh_opcodes[0xf].count = sizeof sh_dsp_opcodef / sizeof sh_dsp_opcodef [0];
    23332333    }
    23342334
     
    28402840                     + sec->output_offset);
    28412841            }
    2842           else if (! info->relocatable)
    2843             {
    2844               if (! ((*info->callbacks->undefined_symbol)
    2845                      (info, h->root.root.string, input_bfd, input_section,
    2846                       rel->r_vaddr - input_section->vma, TRUE)))
    2847                 return FALSE;
    2848             }
     2842          else if (! bfd_link_relocatable (info))
     2843            (*info->callbacks->undefined_symbol)
     2844              (info, h->root.root.string, input_bfd, input_section,
     2845               rel->r_vaddr - input_section->vma, TRUE);
    28492846        }
    28502847
     
    28792876              }
    28802877
    2881             if (! ((*info->callbacks->reloc_overflow)
    2882                    (info, (h ? &h->root : NULL), name, howto->name,
    2883                     (bfd_vma) 0, input_bfd, input_section,
    2884                     rel->r_vaddr - input_section->vma)))
    2885               return FALSE;
     2878            (*info->callbacks->reloc_overflow)
     2879              (info, (h ? &h->root : NULL), name, howto->name,
     2880               (bfd_vma) 0, input_bfd, input_section,
     2881               rel->r_vaddr - input_section->vma);
    28862882          }
    28872883        }
Note: See TracChangeset for help on using the changeset viewer.