daily update
[deliverable/binutils-gdb.git] / bfd / elf32-dlx.c
index 1f380e88eaa4c26c3bf46ab4074ea53d59129e67..2301dae451be1064526e5e364e66e25ef5582af7 100644 (file)
@@ -1,5 +1,5 @@
 /* DLX specific support for 32-bit ELF
-   Copyright 2002, 2003 Free Software Foundation, Inc.
+   Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -228,7 +228,7 @@ HOWTO (R_DLX_RELOC_16_LO,     /* type */
        FALSE);                /* pcrel_offset */
 
 
-/* The gas default beheaver is not to preform the %hi modifier so that the
+/* The gas default behavior is not to preform the %hi modifier so that the
    GNU assembler can have the lower 16 bits offset placed in the insn, BUT
    we do like the gas to indicate it is %hi reloc type so when we in the link
    loader phase we can have the corrected hi16 vale replace the buggous lo16
@@ -257,6 +257,7 @@ _bfd_dlx_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
 {
   bfd_reloc_status_type ret;
   bfd_vma relocation;
+  bfd_size_type sz;
 
   /* If the skip flag is set then we simply do the generic relocating, this
      is more of a hack for dlx gas/gld, so we do not need to do the %hi/%lo
@@ -307,7 +308,8 @@ _bfd_dlx_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
   relocation += reloc_entry->addend;
   relocation += bfd_get_16 (abfd, (bfd_byte *)data + reloc_entry->address);
 
-  if (reloc_entry->address > input_section->_cooked_size)
+  sz = input_section->rawsize ? input_section->rawsize : input_section->size;
+  if (reloc_entry->address > sz)
     return bfd_reloc_outofrange;
 
 #if 0
@@ -493,7 +495,7 @@ elf32_dlx_relocate26  (abfd, reloc_entry, symbol, data,
    More about this table - for dlx elf relocation we do not really
    need this table, if we have a rtype defined in this table will
    caused tc_gen_relocate confused and die on us, but if we remove
-   this table it will caused more problem, so for now simple soulation
+   this table it will caused more problem, so for now simple solution
    is to remove those entries which may cause problem.  */
 struct elf_reloc_map
 {
@@ -558,14 +560,14 @@ elf32_dlx_check_relocs (abfd, info, sec, relocs)
         /* This relocation describes the C++ object vtable hierarchy.
            Reconstruct it for later use during GC.  */
         case R_DLX_GNU_VTINHERIT:
-          if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
+          if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
             return FALSE;
           break;
 
         /* This relocation describes which C++ vtable entries are actually
            used.  Record for later use during GC.  */
         case R_DLX_GNU_VTENTRY:
-          if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+          if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
             return FALSE;
           break;
         }
This page took 0.025107 seconds and 4 git commands to generate.