aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMarcin Koƛcielnicki <koriakin@0x04.net>2016-01-21 09:45:42 +0000
committerAndreas Krebbel <krebbel@gcc.gnu.org>2016-01-21 09:45:42 +0000
commitb929b47014eb64cfc5d9ed3539fc7ef80134211e (patch)
tree6b9c1341b2c5e54f0b3e8345b66f08df1547092e /gcc
parentfac40b023f3be292aa251f215e5678690b79e31b (diff)
downloadgcc-b929b47014eb64cfc5d9ed3539fc7ef80134211e.zip
gcc-b929b47014eb64cfc5d9ed3539fc7ef80134211e.tar.gz
gcc-b929b47014eb64cfc5d9ed3539fc7ef80134211e.tar.bz2
S/390: Use proper read-only data section for literals.
Previously, .rodata was hardcoded. For C++ vague linkage functions, this resulted in needlessly duplicated literals. With the new split stack support, this resulted in link errors, due to .rodata containing relocations to the discarded text sections. gcc/ChangeLog: * config/s390/s390.md (pool_section_start): Use switch_to_section to select proper read-only data section instead of hardcoding .rodata. (pool_section_end): Use switch_to_section to match the above. From-SVN: r232667
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/s390/s390.md11
2 files changed, 16 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dae468c..2ea6938 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2016-01-21 Marcin Koƛcielnicki <koriakin@0x04.net>
+
+ * config/s390/s390.md (pool_section_start): Use switch_to_section
+ to select proper read-only data section instead of hardcoding
+ .rodata.
+ (pool_section_end): Use switch_to_section to match the above.
+
2016-01-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/69378
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index 3e340c3..9b869d5 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -10247,13 +10247,20 @@
(define_insn "pool_section_start"
[(unspec_volatile [(const_int 1)] UNSPECV_POOL_SECTION)]
""
- ".section\t.rodata"
+{
+ switch_to_section (targetm.asm_out.function_rodata_section
+ (current_function_decl));
+ return "";
+}
[(set_attr "length" "0")])
(define_insn "pool_section_end"
[(unspec_volatile [(const_int 0)] UNSPECV_POOL_SECTION)]
""
- ".previous"
+{
+ switch_to_section (current_function_section ());
+ return "";
+}
[(set_attr "length" "0")])
(define_insn "main_base_31_small"