]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix 2 xcoff line number problems
authorTom Rix <trix@redhat.com>
Mon, 8 Oct 2001 18:14:43 +0000 (18:14 +0000)
committerTom Rix <trix@redhat.com>
Mon, 8 Oct 2001 18:14:43 +0000 (18:14 +0000)
gas/ChangeLog
gas/config/obj-coff.c
gas/config/tc-ppc.c

index cbf955e31bce824adcb03df779adb622edc42a51..efe13df9b6690a1c89c1d370940f9e47b88578b3 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-08  Tom Rix <trix@redhat.com>
+
+       * config/tc-ppc (ppc_bf, ppc_biei) : Set first .bi lineno value to 
+       location of next .bf
+       * config/obj-coff.c (coff_frob_symbol) : XCOFF does not use endndx.
+
 2001-10-07  Alan Modra  <amodra@bigpond.net.au>
 
        * config/obj-elf.c: Standardize error/warning messages - don't
index 6c7cc59c93a406ca4fe5cb96ec0fd4af2a54b7d0..90c77fbb1d3ddcb583d13387467bad0b9a1d0192 100644 (file)
@@ -1309,6 +1309,7 @@ coff_frob_symbol (symp, punt)
       set_end = next_set_end;
     }
 
+#ifndef OBJ_XCOFF
   if (! *punt
       && S_GET_STORAGE_CLASS (symp) == C_FCN
       && strcmp (S_GET_NAME (symp), ".bf") == 0)
@@ -1317,7 +1318,7 @@ coff_frob_symbol (symp, punt)
        SA_SET_SYM_ENDNDX (coff_last_bf, symp);
       coff_last_bf = symp;
     }
-
+#endif
   if (coffsymbol (symbol_get_bfdsym (symp))->lineno)
     {
       int i;
index ff63dfc648e0d6b3df6857814309814e90eaadbd..ef4341fe530d1b8e06c3d95e787d039f1b5a5ac4 100644 (file)
@@ -3168,7 +3168,10 @@ ppc_function (ignore)
 }
 
 /* The .bf pseudo-op.  This is just like a COFF C_FCN symbol named
-   ".bf".  */
+   ".bf".  If the pseudo op .bi was seen before .bf, patch the .bi sym
+   with the correct line number */
+static symbolS *saved_bi_sym = 0;
 
 static void
 ppc_bf (ignore)
@@ -3187,6 +3190,14 @@ ppc_bf (ignore)
   S_SET_NUMBER_AUXILIARY (sym, 1);
   SA_SET_SYM_LNNO (sym, coff_line_base);
 
+  /* Line number for bi.  */
+  if (saved_bi_sym) 
+    {
+      S_SET_VALUE (saved_bi_sym, coff_n_line_nos);
+      saved_bi_sym = 0;
+    }
+  
+
   symbol_get_tc (sym)->output = 1;
 
   ppc_frob_label (sym);
@@ -3220,7 +3231,8 @@ ppc_ef (ignore)
 
 /* The .bi and .ei pseudo-ops.  These take a string argument and
    generates a C_BINCL or C_EINCL symbol, which goes at the start of
-   the symbol list.  */
+   the symbol list.  The value of .bi will be know when the next .bf
+   is encountered.  */
 
 static void
 ppc_biei (ei)
@@ -3250,6 +3262,12 @@ ppc_biei (ei)
   S_SET_STORAGE_CLASS (sym, ei ? C_EINCL : C_BINCL);
   symbol_get_tc (sym)->output = 1;
 
+  /* Save bi.  */
+  if (ei) 
+    saved_bi_sym = 0;
+  else
+    saved_bi_sym = sym;
+
   for (look = last_biei ? last_biei : symbol_rootP;
        (look != (symbolS *) NULL
        && (S_GET_STORAGE_CLASS (look) == C_FILE