OSDN Git Service

2000-12-25 Kazu Hirata <kazu@hxi.com>
[pf3gnuchains/pf3gnuchains3x.git] / bfd / coff-alpha.c
index d841663..41e4710 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for ALPHA Extended-Coff files.
-   Copyright 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
+   Copyright 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
    Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
    Ian Lance Taylor <ian@cygnus.com>.
 
@@ -924,7 +924,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
             does not cause anything to happen, itself.  */
          rel->address += input_section->output_offset;
          break;
-           
+
        case ALPHA_R_GPDISP:
          /* This marks the ldah of an ldah/lda pair which loads the
             gp register with the difference of the gp value and the
@@ -980,7 +980,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
            rel->address += input_section->output_offset;
          }
          break;
-         
+
        case ALPHA_R_OP_PUSH:
          /* Push a value on the reloc evaluation stack.  */
          {
@@ -1106,7 +1106,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
            stack[tos - 1] >>= relocation;
          }
          break;
-           
+
        case ALPHA_R_GPVALUE:
          /* I really don't know if this does the right thing.  */
          gp = rel->addend;
@@ -1126,17 +1126,17 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
          os->reloc_count++;
        }
 
-      if (r != bfd_reloc_ok) 
+      if (r != bfd_reloc_ok)
        {
          switch (r)
            {
            case bfd_reloc_undefined:
              if (! ((*link_info->callbacks->undefined_symbol)
                     (link_info, bfd_asymbol_name (*rel->sym_ptr_ptr),
-                     input_bfd, input_section, rel->address)))
+                     input_bfd, input_section, rel->address, true)))
                goto error_return;
              break;
-           case bfd_reloc_dangerous: 
+           case bfd_reloc_dangerous:
              if (! ((*link_info->callbacks->reloc_dangerous)
                     (link_info, err, input_bfd, input_section,
                      rel->address)))
@@ -1332,7 +1332,7 @@ alpha_convert_external_reloc (output_bfd, info, input_bfd, ext_rel, h)
            r_symndx = RELOC_SECTION_XDATA;
          break;
        }
-                     
+
       if (r_symndx == -1)
        abort ();
 
@@ -1437,7 +1437,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
      pointer.  To support large programs, we need to allow multiple
      global pointers.  This works as long as each input .lita section
      is <64KB big.  This implies that when producing relocatable
-     output, the .lita section is limited to 64KB. . */
+     output, the .lita section is limited to 64KB. .  */
 
   lita_sec = symndx_to_section[RELOC_SECTION_LITA];
   gp = _bfd_get_gp_value (output_bfd);
@@ -1619,7 +1619,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
          /* See ALPHA_R_LITERAL above for the uses of this reloc.  It
             does not cause anything to happen, itself.  */
          break;
-           
+
        case ALPHA_R_GPDISP:
          /* This marks the ldah of an ldah/lda pair which loads the
             gp register with the difference of the gp value and the
@@ -1679,7 +1679,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
            gp_usedp = true;
          }
          break;
-         
+
        case ALPHA_R_OP_PUSH:
        case ALPHA_R_OP_PSUB:
        case ALPHA_R_OP_PRSHIFT:
@@ -1719,7 +1719,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
                         relocated.  */
                      if (! ((*info->callbacks->undefined_symbol)
                             (info, h->root.root.string, input_bfd,
-                             input_section, (bfd_vma) 0)))
+                             input_section, (bfd_vma) 0, true)))
                        return false;
                      addend = 0;
                    }
@@ -1921,7 +1921,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
                      if (! ((*info->callbacks->undefined_symbol)
                             (info, h->root.root.string, input_bfd,
                              input_section,
-                             r_vaddr - input_section->vma)))
+                             r_vaddr - input_section->vma, true)))
                        return false;
                      relocation = 0;
                    }
@@ -2008,7 +2008,6 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
 /* Do final adjustments to the filehdr and the aouthdr.  This routine
    sets the dynamic bits in the file header.  */
 
-/*ARGSUSED*/
 static boolean
 alpha_adjust_headers (abfd, fhdr, ahdr)
      bfd *abfd;
@@ -2136,7 +2135,7 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos)
 
       left = size;
 
-      /* I don't know what the next eight bytes are for. */
+      /* I don't know what the next eight bytes are for.  */
       if (bfd_read (ab, 1, 8, nbfd) != 8)
        goto error_return;
 
@@ -2201,7 +2200,7 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos)
  error_return:
   if (nbfd != NULL)
     bfd_close (nbfd);
-  return NULL;  
+  return NULL;
 }
 
 /* Open the next archived file.  */
@@ -2229,7 +2228,7 @@ alpha_ecoff_openr_next_archived_file (archive, last_file)
 
       /* Pad to an even boundary...
         Note that last_file->origin can be odd in the case of
-        BSD-4.4-style element with a long odd size. */
+        BSD-4.4-style element with a long odd size.  */
       filestart = last_file->origin + size;
       filestart += filestart % 2;
     }
@@ -2266,13 +2265,14 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
     (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* reloc_out */
     alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out,
     alpha_ecoff_swap_scnhdr_out,
-    FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, true, false, 4,
+    FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true, false, 4, false, 2,
     alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in,
     alpha_ecoff_swap_scnhdr_in, NULL,
     alpha_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook,
     alpha_ecoff_mkobject_hook, _bfd_ecoff_styp_to_sec_flags,
     _bfd_ecoff_set_alignment_hook, _bfd_ecoff_slurp_symbol_table,
-    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL
   },
   /* Supported architecture.  */
   bfd_arch_alpha,
@@ -2398,5 +2398,7 @@ const bfd_target ecoffalpha_little_vec =
      BFD_JUMP_TABLE_LINK (_bfd_ecoff),
      BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
 
+  NULL,
+
   (PTR) &alpha_ecoff_backend_data
 };