go-gcc.cc (Gcc_backend::immutable_struct_set_init): Use compute_reloc_for_constant.
authorIan Lance Taylor <iant@google.com>
Tue, 6 Aug 2013 16:40:09 +0000 (16:40 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 6 Aug 2013 16:40:09 +0000 (16:40 +0000)
* go-gcc.cc (Gcc_backend::immutable_struct_set_init): Use
compute_reloc_for_constant.

From-SVN: r201535

gcc/go/ChangeLog
gcc/go/go-gcc.cc

index f0317c4a473229485ad95a73c3b619a1404b8007..d2997de3da8d79fbc031c367dbc1a4637184437a 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-06  Ian Lance Taylor  <iant@google.com>
+
+       * go-gcc.cc (Gcc_backend::immutable_struct_set_init): Use
+       compute_reloc_for_constant.
+
 2013-08-02  Ian Lance Taylor  <iant@google.com>
 
        * go-gcc.cc (immutable_struct_set_init): Always call
index 50dbb3128f1d6c9f5bb67ce6b84cb116700462cb..1ecfaffd73a4f12db0f958ef7df7e02f16a196d9 100644 (file)
@@ -1525,7 +1525,9 @@ Gcc_backend::immutable_struct_set_init(Bvariable* var, const std::string&,
 
   // 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);
+  resolve_unique_section(decl,
+                        compute_reloc_for_constant (init_tree),
+                        1);
 
   rest_of_decl_compilation(decl, 1, 0);
 }