On Fri, Jan 29, 2016 at 01:20:08PM -0500, David Edelsohn wrote: > On Fri, Jan 29, 2016 at 11:38 AM, Alan Modra <amo...@gmail.com> wrote: > > 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. > > I'm worried about how this is going to interact with AIX. AIX > assembler is single pass and this patch moves the initialization from > the beginning of the file to the end of the file, which means there > will be references to a label whose definition is delayed until the > end.
AIX toc init is still done at the start of the file. The code to emit .toc or set .LCTOC..1 has moved from rs6000_file_start to rs6000_xcoff_file_start. -- Alan Modra Australia Development Lab, IBM