Fix bug reported by tege. section names wrong if USER_LABEL_PREFIX non-null.
authorJim Wilson <wilson@cygnus.com>
Tue, 16 Jun 1998 18:33:00 +0000 (18:33 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 16 Jun 1998 18:33:00 +0000 (11:33 -0700)
* dwarf2out.c (stripattributes): Prepend '*' to the section name.

From-SVN: r20529

gcc/ChangeLog
gcc/dwarf2out.c

index 0c0b1691a89aeab471c0b7be72573638b5ab7922..166dd64f0a1105679d6fa7cbd8e4ad490a8c27cd 100644 (file)
@@ -1,3 +1,7 @@
+Tue Jun 16 18:30:35 1998  Jim Wilson  <wilson@cygnus.com>
+
+       * dwarf2out.c (stripattributes): Prepend '*' to the section name.
+
 Tue Jun 16 16:49:26 1998  Richard Henderson  <rth@cygnus.com>
 
        * alpha.c (alpha_expand_prologue, alpha_expand_epilogue): New fns.
index 40286de5d2060081cf21d57f98f935135c252494..52f02cd5c94b22ec5d08144bd8eaf9220018df89 100644 (file)
@@ -512,17 +512,19 @@ expand_builtin_dwarf_fp_regnum ()
 #endif
 
 /* Return a pointer to a copy of the section string name S with all
-   attributes stripped off.  */
+   attributes stripped off, and an asterisk prepended (for assemble_name).  */
 
 static inline char *
 stripattributes (s)
      char *s;
 {
-  char *stripped = xstrdup (s);
+  char *stripped = xmalloc (strlen (s) + 2);
   char *p = stripped;
 
-  while (*p && *p != ',')
-    p++;
+  *p++ = '*';
+
+  while (*s && *s != ',')
+    *p++ = *s++;
 
   *p = '\0';
   return stripped;