This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ppc64 undefined .LCTOC0 failures (PR target/17751)
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Alan Modra <amodra at bigpond dot net dot au>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 12 Oct 2004 18:51:12 -0400
- Subject: Re: [PATCH] Fix ppc64 undefined .LCTOC0 failures (PR target/17751)
- References: <20041012170205.GG31909@devserv.devel.redhat.com>
The original problem is an attempt at being too clever by half to
avoid defining the TOC section. Making the logic even more complicated is
not the right direction. GCC on AIX calls toc_section() from
rs6000_xcoff_file_start() to always define the section. Please do not
sprinkle ensure_toc_section() throughout the code and instead extend the
AIX solution.
I would recommend moving the initialization to
rs6000_file_start(), protected by
if (DEFAULT_ABI == ABI_AIX || (TARGET_ELF && flag_pic == 2))
and removing the duplicate from rs6000_xcoff_file_start(). Also, removing
the conditional definition from emit_load_toc_table().
Thanks, David