* config/tc-ppc.c (md_apply_fix3): Allow BRTAKEN, BRNTAKEN relocs.
[deliverable/binutils-gdb.git] / gas / stabs.c
index 60b03c49941b3d6613945ee52dd5f94d1c8972ab..900826b231f278755b5c3affed0d67336b751b45 100644 (file)
@@ -240,6 +240,14 @@ s_stab_generic (what, stab_secname, stabstr_secname)
   other = longint;
 
   desc = get_absolute_expression ();
+
+  if ((desc > 0xffff) || (desc < -0x8000))
+    /* This could happen for example with a source file with a huge
+       number of lines.  The only cure is to use a different debug
+       format, probably DWARF.  */
+    as_warn (_(".stab%c: description field '%x' too big, try a different debug format"),
+            what, desc);
+
   if (what == 's' || what == 'n')
     {
       if (*input_line_pointer != ',')
@@ -343,7 +351,7 @@ s_stab_generic (what, stab_secname, stabstr_secname)
       if (what == 's')
        {
          /* Release the string, if nobody else has used the obstack.  */
-         if (saved_string_obstack_end == notes.next_free) 
+         if (saved_string_obstack_end == notes.next_free)
            obstack_free (&notes, string);
        }
 
@@ -363,13 +371,11 @@ s_stab_generic (what, stab_secname, stabstr_secname)
        }
       else
        {
-         const char *fake;
          symbolS *symbol;
          expressionS exp;
 
          /* Arrange for a value representing the current location.  */
-         fake = FAKE_LABEL_NAME;
-         symbol = symbol_new (fake, saved_seg, dot, saved_frag);
+         symbol = symbol_temp_new (saved_seg, dot, saved_frag);
 
          exp.X_op = O_symbol;
          exp.X_add_symbol = symbol;
@@ -580,7 +586,7 @@ stabs_generate_asm_lineno ()
   unsigned int lineno;
   char *buf;
   char sym[30];
-  /* Remember the last file/line and avoid duplicates. */
+  /* Remember the last file/line and avoid duplicates.  */
   static unsigned int prev_lineno = -1;
   static char *prev_file = NULL;
 
@@ -593,22 +599,22 @@ stabs_generate_asm_lineno ()
 
   as_where (&file, &lineno);
 
-  /* Don't emit sequences of stabs for the same line. */
+  /* Don't emit sequences of stabs for the same line.  */
   if (prev_file == NULL)
     {
-      /* First time thru. */
+      /* First time thru.  */
       prev_file = xstrdup (file);
       prev_lineno = lineno;
     }
   else if (lineno == prev_lineno
           && strcmp (file, prev_file) == 0)
     {
-      /* Same file/line as last time. */
+      /* Same file/line as last time.  */
       return;
     }
   else
     {
-      /* Remember file/line for next time. */
+      /* Remember file/line for next time.  */
       prev_lineno = lineno;
       if (strcmp (file, prev_file) != 0)
        {
This page took 0.024433 seconds and 4 git commands to generate.