This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] PowerPC select_section / unique_section


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]