This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Clean global object source of file function name (PR target/35485)
- From: "David Edelsohn" <dje dot gcc at gmail dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 17 Oct 2008 09:27:01 -0400
- Subject: Re: [PATCH] Clean global object source of file function name (PR target/35485)
- References: <303e1d290810151905u74b1dea8vb479cca462ceee62@mail.gmail.com>
The original patch needed a slight tweak for type safety.
Again, nothing guarantees that a global symbol uses a characters that are
safe for a label or function on the target. This patch cleans the
prefix produced
by the global symbol in the same way as a prefix produced by other methods.
Bootstrapped on powerpc-ibm-aix5.3.0.0
Okay for mainline?
Thanks, David
PR target/35485
* tree.c (get_file_function_name): Clean first_global_object_name.
Index: tree.c
===================================================================
--- tree.c (revision 141170)
+++ tree.c (working copy)
@@ -6923,7 +6923,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 = q = ASTRDUP (first_global_object_name);
+ clean_symbol_name (q);
+ }
/* If the target is handling the constructors/destructors, they
will be local to this file and the name is only necessary for
debugging purposes. */