+2013-08-02 Ian Lance Taylor <iant@google.com>
+
+ * go-gcc.cc (immutable_struct_set_init): Always call
+ resolve_unique_section.
+
2013-07-24 Ian Lance Taylor <iant@google.com>
* go-gcc.cc (Gcc_backend::non_zero_size_type): If a struct has a
TREE_PUBLIC(decl) = 1;
}
else
- {
- make_decl_one_only(decl, DECL_ASSEMBLER_NAME(decl));
- resolve_unique_section(decl, 1, 0);
- }
+ make_decl_one_only(decl, DECL_ASSEMBLER_NAME(decl));
+
+ // These variables are often unneeded in the final program, so put
+ // them in their own section so that linker GC can discard them.
+ resolve_unique_section(decl, 1, 1);
rest_of_decl_compilation(decl, 1, 0);
}