mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-17 18:00:55 +08:00
(assemble_start_function, assemble_variable):
Make sure first_global_object_name is in permanent obstack. From-SVN: r9862
This commit is contained in:
parent
02db8dd0e3
commit
06bb02f78e
18
gcc/varasm.c
18
gcc/varasm.c
@ -801,7 +801,14 @@ assemble_start_function (decl, fnname)
|
||||
if (TREE_PUBLIC (decl))
|
||||
{
|
||||
if (!first_global_object_name)
|
||||
STRIP_NAME_ENCODING (first_global_object_name, fnname);
|
||||
{
|
||||
char *p;
|
||||
|
||||
STRIP_NAME_ENCODING (p, fnname);
|
||||
first_global_object_name = permalloc (strlen (p) + 1);
|
||||
strcpy (first_global_object_name, p);
|
||||
}
|
||||
|
||||
#ifdef ASM_WEAKEN_LABEL
|
||||
if (DECL_WEAK (decl))
|
||||
ASM_WEAKEN_LABEL (asm_out_file, fnname);
|
||||
@ -1176,7 +1183,14 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
|
||||
if (TREE_PUBLIC (decl) && DECL_NAME (decl))
|
||||
{
|
||||
if (!first_global_object_name)
|
||||
STRIP_NAME_ENCODING(first_global_object_name, name);
|
||||
{
|
||||
char *p;
|
||||
|
||||
STRIP_NAME_ENCODING (p, name);
|
||||
first_global_object_name = permalloc (strlen (p) + 1);
|
||||
strcpy (first_global_object_name, p);
|
||||
}
|
||||
|
||||
#ifdef ASM_WEAKEN_LABEL
|
||||
if (DECL_WEAK (decl))
|
||||
ASM_WEAKEN_LABEL (asm_out_file, name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user