* symbols.c (fb_label_name): Allow an augend of 2 for mmix.
[deliverable/binutils-gdb.git] / bfd / ecofflink.c
index 9e23848fda7da98b476b67b1321d0ce8a03a216b..dee94d3a3a0a257e885e04f34350f0ef7dc01c68 100644 (file)
@@ -1,5 +1,5 @@
 /* Routines to link ECOFF debugging information.
-   Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003
+   Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>.
 
@@ -800,20 +800,6 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
 
       fdr_adr = fdr.adr;
 
-      /* Adjust the FDR address for any changes that may have been
-        made by relaxing.  */
-      if (input_debug->adjust != (struct ecoff_value_adjust *) NULL)
-       {
-         struct ecoff_value_adjust *adjust;
-
-         for (adjust = input_debug->adjust;
-              adjust != (struct ecoff_value_adjust *) NULL;
-              adjust = adjust->next)
-           if (fdr_adr >= adjust->start
-               && fdr_adr < adjust->end)
-             fdr.adr += adjust->adjust;
-       }
-
       /* FIXME: It is conceivable that this FDR points to the .init or
         .fini section, in which case this will not do the right
         thing.  */
@@ -856,19 +842,6 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
            case stLabel:
            case stProc:
            case stStaticProc:
-             if (input_debug->adjust != (struct ecoff_value_adjust *) NULL)
-               {
-                 bfd_vma value;
-                 struct ecoff_value_adjust *adjust;
-
-                 value = internal_sym.value;
-                 for (adjust = input_debug->adjust;
-                      adjust != (struct ecoff_value_adjust *) NULL;
-                      adjust = adjust->next)
-                   if (value >= adjust->start
-                       && value < adjust->end)
-                     internal_sym.value += adjust->adjust;
-               }
              internal_sym.value += section_adjust[internal_sym.sc];
              break;
 
@@ -978,9 +951,8 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
          output_symhdr->issMax += fdr.cbSs;
        }
 
-      if ((output_bfd->xvec->header_byteorder
-          == input_bfd->xvec->header_byteorder)
-         && input_debug->adjust == (struct ecoff_value_adjust *) NULL)
+      if (output_bfd->xvec->header_byteorder
+         == input_bfd->xvec->header_byteorder)
        {
          /* The two BFD's have the same endianness, and we don't have
             to adjust the PDR addresses, so simply copying the
@@ -1036,23 +1008,6 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
              PDR pdr;
 
              (*input_swap->swap_pdr_in) (input_bfd, (PTR) in, &pdr);
-
-             /* If we have been relaxing, we may have to adjust the
-                address.  */
-             if (input_debug->adjust != (struct ecoff_value_adjust *) NULL)
-               {
-                 bfd_vma adr;
-                 struct ecoff_value_adjust *adjust;
-
-                 adr = fdr_adr + pdr.adr;
-                 for (adjust = input_debug->adjust;
-                      adjust != (struct ecoff_value_adjust *) NULL;
-                      adjust = adjust->next)
-                   if (adr >= adjust->start
-                       && adr < adjust->end)
-                     pdr.adr += adjust->adjust;
-               }
-
              (*output_swap->swap_pdr_out) (output_bfd, &pdr, (PTR) out);
            }
 
@@ -1199,7 +1154,7 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug,
   fdr.issBase = output_symhdr->issMax;
   fdr.cbSs = 0;
   fdr.rss = ecoff_add_string (ainfo, info, output_debug, &fdr,
-                             bfd_archive_filename (input_bfd));
+                             input_bfd->filename);
   if (fdr.rss == -1)
     return FALSE;
   fdr.isymBase = output_symhdr->isymMax;
@@ -1884,24 +1839,9 @@ mk_fdrtab (abfd, debug_info, debug_swap, line_info)
             addresses do not equal the FDR vma, but they (the PDR address)
             are still vma's and not offsets.  Cf. comments in
             'lookup_line'.  */
-#if 0
-           bfd_size_type external_pdr_size;
-           char *pdr_ptr;
-           PDR pdr;
-           
-           external_pdr_size = debug_swap->external_pdr_size;
-           
-           pdr_ptr = ((char *) debug_info->external_pdr
-                     + fdr_ptr->ipdFirst * external_pdr_size);
-           (*debug_swap->swap_pdr_in) (abfd, (PTR) pdr_ptr, &pdr);
-         /* The address of the first PDR is the offset of that
-            procedure relative to the beginning of file FDR.  */
-           tab->base_addr = fdr_ptr->adr - pdr.adr;
-#else
          /* The address of the first PDR is the offset of that
             procedure relative to the beginning of file FDR.  */
          tab->base_addr = fdr_ptr->adr; 
-#endif
        }
       else
        {
@@ -2160,11 +2100,6 @@ lookup_line (abfd, debug_info, debug_swap, line_info)
          considerably, which is undesirable.  */
       external_pdr_size = debug_swap->external_pdr_size;
 
-#if 0 /* eraxxon: PDR addresses (pdr.adr) are not relative to FDRs!
-        Leave 'offset' alone.  */
-      /* Make offset relative to object file's start-address.  */
-      offset -= tab[i].base_addr;
-#endif
       /* eraxxon: The Horrible Hack: Because of the problems above, set 'i'
         to 0 so we look through all FDRs.
 
This page took 0.026166 seconds and 4 git commands to generate.