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

« back to all changes in this revision

Viewing changes to bfd/elf32-openrisc.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
/* OpenRISC-specific support for 32-bit ELF.
2
 
   Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
 
2
   Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
3
3
   Contributed by Johan Rydberg, jrydberg@opencores.org
4
4
 
5
5
This file is part of BFD, the Binary File Descriptor library.
375
375
        {
376
376
          sym = local_syms + r_symndx;
377
377
          sec = local_sections[r_symndx];
378
 
          relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
 
378
          relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
379
379
 
380
380
          name = bfd_elf_string_from_elf_section
381
381
            (input_bfd, symtab_hdr->sh_link, sym->st_name);
383
383
        }
384
384
      else
385
385
        {
386
 
          h = sym_hashes[r_symndx - symtab_hdr->sh_info];
387
 
 
388
 
          while (h->root.type == bfd_link_hash_indirect
389
 
                 || h->root.type == bfd_link_hash_warning)
390
 
            h = (struct elf_link_hash_entry *) h->root.u.i.link;
391
 
 
392
 
          name = h->root.root.string;
393
 
 
394
 
          if (h->root.type == bfd_link_hash_defined
395
 
              || h->root.type == bfd_link_hash_defweak)
396
 
            {
397
 
              sec = h->root.u.def.section;
398
 
              relocation = (h->root.u.def.value
399
 
                            + sec->output_section->vma + sec->output_offset);
400
 
            }
401
 
          else if (h->root.type == bfd_link_hash_undefweak)
402
 
            {
403
 
              relocation = 0;
404
 
            }
405
 
          else
406
 
            {
407
 
              if (!((*info->callbacks->undefined_symbol)
408
 
                    (info, h->root.root.string, input_bfd,
409
 
                     input_section, rel->r_offset, TRUE)))
410
 
                return FALSE;
411
 
              relocation = 0;
412
 
            }
 
386
          bfd_boolean unresolved_reloc, warned;
 
387
 
 
388
          RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
 
389
                                   r_symndx, symtab_hdr, sym_hashes,
 
390
                                   h, sec, relocation,
 
391
                                   unresolved_reloc, warned);
413
392
        }
414
393
 
415
394
      r = openrisc_final_link_relocate (howto, input_bfd, input_section,
556
535
          /* This relocation describes the C++ object vtable hierarchy.
557
536
             Reconstruct it for later use during GC.  */
558
537
        case R_OPENRISC_GNU_VTINHERIT:
559
 
          if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
 
538
          if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
560
539
            return FALSE;
561
540
          break;
562
541
 
563
542
          /* This relocation describes which C++ vtable entries are actually
564
543
             used.  Record for later use during GC.  */
565
544
        case R_OPENRISC_GNU_VTENTRY:
566
 
          if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
 
545
          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
567
546
            return FALSE;
568
547
          break;
569
548
        }