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: Richard Henderson <rth at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Alan Modra <amodra at bigpond dot net dot au>, Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>, Geoff Keating <geoffk at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Aug 2002 18:19:23 -0700
- Subject: Re: [RFC] PowerPC select_section / unique_section
- References: <200208221959.PAA27600@makai.watson.ibm.com>
On Thu, Aug 22, 2002 at 03:59:16PM -0400, David Edelsohn wrote:
> * output.h (decl_readonly_section): Add pic parameter.
> * varasm.c (default_section_type_flags): Use flag_pic as pic
> argument to decl_readonly_section.
> (default_select_section): Same.
> (categorize_decl_for_section): Add pic parameter. Use it in place
> of flag_pic.
> (decl_readonly_section): Add pic paramter.
> (default_elf_select_section): Use flag_pic as pic argument to
> categorize_decl_for_section.
> (default_unique_section): Same.
For 3.2 you need to make this as minimal as possible. As is
you'd need to touch arm, i386, mcore and mips. Saving and
restoring flag_pic around the calls in the rs6000 backend is
really best.
For 3.4, I'd _really_ like to see the ppc backend cleaned up
to use targetm.in_small_data_p and the standard varasm.c
functions. I guess I don't know what I'd want to happen with
flag_pic. I don't really mind the backend save/restore thing;
possibly a better solution is to introduce a targetm member
that forces flag_pic to be considered true wrt relocs.
Yes, I'm aware that the existing varasm.c code can't handle
the ppc-eabi .sdata2 section; that can be fixed.
For 3.3... I have no idea. I guess there's no point in writing
three patches, so you might as well apply the 3.2 patch there
as well.
r~