aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/go-gcc.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2013-08-02 18:24:19 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2013-08-02 18:24:19 +0000
commita572c4549742bb0876335f3be4c5a76fac555454 (patch)
tree11d47e6c0e0d1bb423cf9f9a28ee06378cf5492c /gcc/go/go-gcc.cc
parentaa7e089fdc0e8095f6790ec53ccad0472573de79 (diff)
downloadgcc-a572c4549742bb0876335f3be4c5a76fac555454.zip
gcc-a572c4549742bb0876335f3be4c5a76fac555454.tar.gz
gcc-a572c4549742bb0876335f3be4c5a76fac555454.tar.bz2
go-gcc.cc (immutable_struct_set_init): Always call resolve_unique_section.
* go-gcc.cc (immutable_struct_set_init): Always call resolve_unique_section. From-SVN: r201446
Diffstat (limited to 'gcc/go/go-gcc.cc')
-rw-r--r--gcc/go/go-gcc.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc
index 27c756e..50dbb31 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);
}