~ubuntu-branches/ubuntu/hoary/binutils/hoary

« back to all changes in this revision

Viewing changes to bfd/elf32-mcore.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2005-03-18 13:07:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050318130752-j4i37zgqclj53b94
Tags: 2.15-5ubuntu2
debian/rules: Call pkgstriptranslations if present (the package does not
use debhelper, thus it does not happen automatically).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Motorola MCore specific support for 32-bit ELF
2
 
   Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003
 
2
   Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004
3
3
   Free Software Foundation, Inc.
4
4
 
5
5
This file is part of BFD, the Binary File Descriptor library.
84
84
         0,                     /* bitpos */
85
85
         complain_overflow_bitfield, /* complain_on_overflow */
86
86
         bfd_elf_generic_reloc, /* special_function */
87
 
         "ADDR32",              /* name *//* For compatability with coff/pe port.  */
 
87
         "ADDR32",              /* name *//* For compatibility with coff/pe port.  */
88
88
         FALSE,                 /* partial_inplace */
89
89
         0x0,                   /* src_mask */
90
90
         0xffffffff,            /* dst_mask */
467
467
        {
468
468
          sym = local_syms + r_symndx;
469
469
          sec = local_sections [r_symndx];
470
 
          relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
 
470
          relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
471
471
          addend = rel->r_addend;
472
472
        }
473
473
      else
474
474
        {
475
 
          h = sym_hashes [r_symndx - symtab_hdr->sh_info];
476
 
          if (   h->root.type == bfd_link_hash_defined
477
 
              || h->root.type == bfd_link_hash_defweak)
478
 
            {
479
 
              sec = h->root.u.def.section;
480
 
              relocation = (h->root.u.def.value
481
 
                            + sec->output_section->vma
482
 
                            + sec->output_offset);
483
 
            }
484
 
          else if (h->root.type == bfd_link_hash_undefweak)
485
 
            relocation = 0;
486
 
          else if (info->shared
487
 
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
488
 
            relocation = 0;
489
 
          else
490
 
            {
491
 
              if (! ((*info->callbacks->undefined_symbol)
492
 
                        (info, h->root.root.string, input_bfd,
493
 
                         input_section, rel->r_offset, TRUE)))
494
 
                return FALSE;
 
475
          bfd_boolean unresolved_reloc, warned;
495
476
 
496
 
              ret = FALSE;
497
 
              continue;
498
 
            }
 
477
          RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
 
478
                                   r_symndx, symtab_hdr, sym_hashes,
 
479
                                   h, sec, relocation,
 
480
                                   unresolved_reloc, warned);
499
481
        }
500
482
 
501
483
      switch (r_type)
665
647
        /* This relocation describes the C++ object vtable hierarchy.
666
648
           Reconstruct it for later use during GC.  */
667
649
        case R_MCORE_GNU_VTINHERIT:
668
 
          if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
 
650
          if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
669
651
            return FALSE;
670
652
          break;
671
653
 
672
654
        /* This relocation describes which C++ vtable entries are actually
673
655
           used.  Record for later use during GC.  */
674
656
        case R_MCORE_GNU_VTENTRY:
675
 
          if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 
657
          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
676
658
            return FALSE;
677
659
          break;
678
660
        }