This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] PowerPC select_section / unique_section
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Geoff Keating <geoffk at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 22 Aug 2002 11:22:15 +0930
- Subject: Re: [RFC] PowerPC select_section / unique_section
- References: <200208211720.NAA26564@makai.watson.ibm.com>
On Wed, Aug 21, 2002 at 01:20:18PM -0400, David Edelsohn wrote:
> * config/rs6000/rs6000.c (rs6000_elf_select_section): Treat
> DEFAULT_ABI == ABI_AIX like PIC. Test PIC & reloc for readonly
> default.
> (rs6000_elf_unique_section): Treat DEFAULT_ABI == ABI_AIX like
> PIC.
> (rs6000_xcoff_select_section): Update to recent readonly
> algorithm.
Why not use decl_readonly_section? rs6000_elf_select_section ends up
looking like:
needs_sdata = (size > 0
&& size <= g_switch_value
&& rs6000_sdata != SDATA_NONE
&& (rs6000_sdata != SDATA_DATA || TREE_PUBLIC (decl)));
readonly = 0;
if (!needs_sdata || rs6000_sdata == SDATA_EABI)
readonly = decl_readonly_section (decl, reloc);
(*sec_funcs[(readonly ? 0 : 2) + (needs_sdata ? 1 : 0)])();
Similarly for the other functions. I've used this on gcc-3.2 based
powerpc64-linux for a couple of weeks. Patch available on request.
--
Alan Modra
IBM OzLabs - Linux Technology Centre