]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
mips.c (mips_file_end): Only write symbols that have been referenced at some point.
authorRichard Sandiford <rsandifo@redhat.com>
Tue, 16 Dec 2003 08:15:33 +0000 (08:15 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 16 Dec 2003 08:15:33 +0000 (08:15 +0000)
* config/mips/mips.c (mips_file_end): Only write symbols that have
been referenced at some point.

From-SVN: r74681

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

index 18f19168ddd3101d979e86617d009d3e065a060d..c7cd477349d338bd9dd6030c1539fcaf3840a55d 100644 (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
index e0a01ce814f300a896c344cf03294fb0aaa68355..c748bac73af34c147ff966e211643905d2673f0d 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