mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-30 02:24:45 +08:00
varasm.c (assemble_start_function): Add weak_global_object_name.
* varasm.c (assemble_start_function): Add weak_global_object_name. * tree.c (get_file_function_name): Use it. From-SVN: r20612
This commit is contained in:
parent
0d091530be
commit
ee8303096a
@ -1,3 +1,8 @@
|
||||
Fri Jun 19 23:06:33 1998 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* varasm.c (assemble_start_function): Add weak_global_object_name.
|
||||
* tree.c (get_file_function_name): Use it.
|
||||
|
||||
Fri Jun 19 22:55:14 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* c-lang.c (GNU_xref_begin, GNU_xref_end): Deleted.
|
||||
|
@ -4793,6 +4793,7 @@ dump_tree_statistics ()
|
||||
#endif /* NO_DOLLAR_IN_LABEL */
|
||||
|
||||
extern char * first_global_object_name;
|
||||
extern char * weak_global_object_name;
|
||||
|
||||
/* If KIND=='I', return a suitable global initializer (constructor) name.
|
||||
If KIND=='D', return a suitable global clean-up (destructor) name. */
|
||||
@ -4806,6 +4807,8 @@ get_file_function_name (kind)
|
||||
|
||||
if (first_global_object_name)
|
||||
p = first_global_object_name;
|
||||
else if (weak_global_object_name)
|
||||
p = weak_global_object_name;
|
||||
else if (main_input_filename)
|
||||
p = main_input_filename;
|
||||
else
|
||||
|
14
gcc/varasm.c
14
gcc/varasm.c
@ -85,6 +85,7 @@ extern FILE *asm_out_file;
|
||||
|
||||
/* The (assembler) name of the first globally-visible object output. */
|
||||
char *first_global_object_name;
|
||||
char *weak_global_object_name;
|
||||
|
||||
extern struct obstack *current_obstack;
|
||||
extern struct obstack *saveable_obstack;
|
||||
@ -1003,14 +1004,19 @@ assemble_start_function (decl, fnname)
|
||||
|
||||
if (TREE_PUBLIC (decl))
|
||||
{
|
||||
if (!first_global_object_name && ! DECL_WEAK (decl)
|
||||
&& ! DECL_ONE_ONLY (decl))
|
||||
if (! first_global_object_name)
|
||||
{
|
||||
char *p;
|
||||
char **name;
|
||||
|
||||
if (! DECL_WEAK (decl) && ! DECL_ONE_ONLY (decl))
|
||||
name = &first_global_object_name;
|
||||
else
|
||||
name = &weak_global_object_name;
|
||||
|
||||
STRIP_NAME_ENCODING (p, fnname);
|
||||
first_global_object_name = permalloc (strlen (p) + 1);
|
||||
strcpy (first_global_object_name, p);
|
||||
*name = permalloc (strlen (p) + 1);
|
||||
strcpy (*name, p);
|
||||
}
|
||||
|
||||
#ifdef ASM_WEAKEN_LABEL
|
||||
|
Loading…
Reference in New Issue
Block a user