diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-08-02 18:24:19 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-08-02 18:24:19 +0000 |
commit | 1eeab44fcee00e2d71440968a71ace5eef785ade (patch) | |
tree | 11d47e6c0e0d1bb423cf9f9a28ee06378cf5492c /gcc/go/go-gcc.cc | |
parent | ec8fda00fe7ab99aa47cd2b9b43e42a24394af0e (diff) | |
download | gcc-1eeab44fcee00e2d71440968a71ace5eef785ade.tar.gz |
* go-gcc.cc (immutable_struct_set_init): Always call
resolve_unique_section.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201446 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/go/go-gcc.cc')
-rw-r--r-- | gcc/go/go-gcc.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc index 27c756e5496..50dbb3128f1 100644 --- a/gcc/go/go-gcc.cc +++ b/gcc/go/go-gcc.cc @@ -1521,10 +1521,11 @@ Gcc_backend::immutable_struct_set_init(Bvariable* var, const std::string&, 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); } |