public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Clean global object source of file function name (PR target/35485)
@ 2008-10-16  8:18 David Edelsohn
  2008-10-17 15:15 ` David Edelsohn
  0 siblings, 1 reply; 4+ messages in thread
From: David Edelsohn @ 2008-10-16  8:18 UTC (permalink / raw)
  To: GCC Patches

Nothing guarantees that first_global_object_name does not contain any illegal
characters.  It needs to be cleaned like all of the other sources.

This allows libjava to link on AIX.

Bootstrapped on powerpc-ibm-aix.5.3.0.0

David


        PR target/35485
        * tree.c (get_file_function_name): Clean first_global_object_name.

Index: tree.c
===================================================================
--- tree.c      (revision 141136)
+++ tree.c      (working copy)
@@ -6882,7 +6882,10 @@

   /* If we already have a name we know to be unique, just use that.  */
   if (first_global_object_name)
-    p = first_global_object_name;
+    {
+      p = ASTRDUP (first_global_object_name);
+      clean_symbol_name (p);
+    }
   /* If the target is handling the constructors/destructors, they
      will be local to this file and the name is only necessary for
      debugging purposes.  */

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-21 17:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-16  8:18 [PATCH] Clean global object source of file function name (PR target/35485) David Edelsohn
2008-10-17 15:15 ` David Edelsohn
2008-10-21  7:56   ` Mark Mitchell
2008-10-21 18:42     ` David Edelsohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).