]> git.ipfire.org Git - thirdparty/gcc.git/commit
[RS6000] ABI_V4 init of toc section
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Feb 2016 00:01:16 +0000 (00:01 +0000)
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Feb 2016 00:01:16 +0000 (00:01 +0000)
commit3e3cd104b24592f48dc4440a511f72613cbeb54f
tree7b160fbbcebddbd11d9eae06696812fc688db6e0
parentdcddc5afa8b2a7d450eae7a223c7efecdf8b3e3a
[RS6000] ABI_V4 init of toc section

Since 4c4a180d lto has turned off flag_pic when linking a fixed
position executable.  So flag_pic is zero in rs6000_file_start.
However, when we get to actually emitting code, flag_pic may be on
again.  This results in undefined references to ".LCTOC1".

PR target/68662
* config/rs6000/rs6000.c (need_toc_init): New var, set it
whenever toc_label_name used.
(rs6000_file_start): Don't set up toc section here,
(rs6000_output_function_epilogue): do so here instead,
(rs6000_xcoff_file_start): and here.
* config/rs6000/rs6000.md (load_toc_aix_si): Set need_toc_init.
(load_toc_aix_di): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233061 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md