OSDN Git Service

* config/mips/mips.c (mips_file_end): Only write symbols that have
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Dec 2003 08:15:33 +0000 (08:15 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Dec 2003 08:15:33 +0000 (08:15 +0000)
been referenced at some point.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74681 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/mips/mips.c

index 18f1916..c7cd477 100644 (file)
@@ -1,5 +1,10 @@
 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
        (mips_build_builtin_va_list): Use lang_hooks.types.make_type.
 
index e0a01ce..c748bac 100644 (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