This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto][patch] Don't put static variables in the symbol table
- From: "Rafael Espindola" <espindola at google dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Cc: "Diego Novillo" <dnovillo at google dot com>
- Date: Tue, 23 Sep 2008 11:35:44 +0100
- Subject: [lto][patch] Don't put static variables in the symbol table
2008-09-23 Rafael Espindola <espindola@google.com>
* lto-section-out.c (write_symbol_vec): Skip non TREE_PUBLIC nodes.
Cheers,
--
Rafael Avila de Espindola
Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047
diff --git a/gcc/lto-section-out.c b/gcc/lto-section-out.c
index 2b4264f..2827311 100644
--- a/gcc/lto-section-out.c
+++ b/gcc/lto-section-out.c
@@ -1060,6 +1060,9 @@ write_symbol_vec (htab_t hash, struct lto_output_stream *stream,
uint64_t size;
const char *comdat;
+ if (!TREE_PUBLIC (t))
+ continue;
+
if (TREE_CODE (t) == VAR_DECL
|| TREE_CODE (t) == FUNCTION_DECL)
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (t));