Commit b929b470 by Marcin Kościelnicki Committed by Andreas Krebbel

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
parent fac40b02
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> 2016-01-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/69378 PR tree-optimization/69378
......
...@@ -10247,13 +10247,20 @@ ...@@ -10247,13 +10247,20 @@
(define_insn "pool_section_start" (define_insn "pool_section_start"
[(unspec_volatile [(const_int 1)] UNSPECV_POOL_SECTION)] [(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")]) [(set_attr "length" "0")])
(define_insn "pool_section_end" (define_insn "pool_section_end"
[(unspec_volatile [(const_int 0)] UNSPECV_POOL_SECTION)] [(unspec_volatile [(const_int 0)] UNSPECV_POOL_SECTION)]
"" ""
".previous" {
switch_to_section (current_function_section ());
return "";
}
[(set_attr "length" "0")]) [(set_attr "length" "0")])
(define_insn "main_base_31_small" (define_insn "main_base_31_small"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment