mips.c (mips_file_end): Only write symbols that have been referenced at some point.

* config/mips/mips.c (mips_file_end): Only write symbols that have
	been referenced at some point.

From-SVN: r74681
This commit is contained in:
Richard Sandiford 2003-12-16 08:15:33 +00:00 committed by Richard Sandiford
parent 2743a50a74
commit a689d4e0ea
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2003-12-16 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips.c (mips_file_end): Only write symbols that have
been referenced at some point.
2003-12-16 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips.c: Include langhooks.h

View file

@ -5846,7 +5846,8 @@ mips_file_end (void)
name_tree = get_identifier (p->name);
/* Positively ensure only one .extern for any given symbol. */
if (! TREE_ASM_WRITTEN (name_tree))
if (!TREE_ASM_WRITTEN (name_tree)
&& TREE_SYMBOL_REFERENCED (name_tree))
{
TREE_ASM_WRITTEN (name_tree) = 1;
/* In IRIX 5 or IRIX 6 for the O32 ABI, we must output a