[PATCH] Clean global object source of file function name (PR target/35485)
David Edelsohn
dje.gcc@gmail.com
Fri Oct 17 15:15:00 GMT 2008
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. */
More information about the Gcc-patches
mailing list