Changeset 1973 for binutils/trunk/bfd/coff-sh.c
- Timestamp:
- Feb 6, 2017, 1:00:00 PM (8 years ago)
- Location:
- binutils/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
binutils/trunk ¶
-
Property svn:mergeinfo
set to
/binutils/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
TabularUnified binutils/trunk/bfd/coff-sh.c ¶
r970 r1973 1 1 /* BFD back-end for Renesas Super-H COFF binaries. 2 Copyright (C) 1993-201 4Free Software Foundation, Inc.2 Copyright (C) 1993-2016 Free Software Foundation, Inc. 3 3 Contributed by Cygnus Support. 4 4 Written by Steve Chamberlain, <sac@cygnus.com>. … … 531 531 /* This is the same as the macro in coffcode.h, except that it copies 532 532 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; \ 549 549 if ((reloc).r_type == R_SH_SWITCH8 \ 550 550 || (reloc).r_type == R_SH_SWITCH16 \ … … 715 715 *again = FALSE; 716 716 717 if ( link_info->relocatable717 if (bfd_link_relocatable (link_info) 718 718 || (sec->flags & SEC_RELOC) == 0 719 719 || sec->reloc_count == 0) … … 2330 2330 { 2331 2331 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]; 2333 2333 } 2334 2334 … … 2840 2840 + sec->output_offset); 2841 2841 } 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); 2849 2846 } 2850 2847 … … 2879 2876 } 2880 2877 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); 2886 2882 } 2887 2883 }
Note:
See TracChangeset
for help on using the changeset viewer.