re PR target/81979 (Assembler messages: Error: can't resolve `.got2' {.got2 section...
authorJakub Jelinek <jakub@redhat.com>
Thu, 7 Sep 2017 11:20:40 +0000 (13:20 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 7 Sep 2017 11:20:40 +0000 (13:20 +0200)
commit86373d9214e40b5a05b1469da4b7a1d92b4a60fc
treee19f3204ac224f9a848867cd139c2f2267adc1ab
parented323421344929d7b6104566d8301ce4f88fd00c
re PR target/81979 (Assembler messages: Error: can't resolve `.got2' {.got2 section} - `.LCF0' {.text.unlikely section})

PR target/81979
* output.h (switch_to_other_text_partition): New declaration.
* varasm.c (switch_to_other_text_partition): New function.
* config/rs6000/rs6000.c (uses_TOC): Return 2 if
NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
(rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
to the other text partition before emitting LCL label and switch back
after emitting the word after it.

* gcc.dg/pr81979.c: New test.

From-SVN: r251843
gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/output.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr81979.c [new file with mode: 0644]
gcc/varasm.c