diff options
author | krebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-21 09:45:42 +0000 |
---|---|---|
committer | krebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-21 09:45:42 +0000 |
commit | 6621a5b5fb04c7b628b0fb18700f44ff8c50bea6 (patch) | |
tree | 6b9c1341b2c5e54f0b3e8345b66f08df1547092e /gcc/config/s390 | |
parent | 8d6b2506db68708694358462554a383e43729efa (diff) | |
download | gcc-6621a5b5fb04c7b628b0fb18700f44ff8c50bea6.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232667 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/s390')
-rw-r--r-- | gcc/config/s390/s390.md | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 3e340c35030..9b869d566a3 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" |