This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]