This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Clean global object source of file function name (PR target/35485)


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.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]