This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Unify PPC section selection
On Sun, May 19, 2002 at 08:44:58PM +0200, Franz Sirl wrote:
> Hmm, looks nice, it seems just the sdata2 handling is missing.
Which is read-only though not marked as such, correct?
> Richard, what about putting "enum section_category" in a header, pass it to
> in_small_data_p and let it return a section_category? Or do you prefer a
> in_small_data2_p routine?
I prefer that the categorization function also be a hook, the
result of which is passed to select_section and unique_section
instead of the current "reloc" argument.
That was too much change all at once though.
The enumeration isn't sufficient. It needs to be a bit-mask.
Perhaps you can re-use the SECTION_* flags, perhaps not. In
this way you can use the generic categorization function, but
override select section to notice that read-only + small means
sdata2, and pass everything else off to the default function.
Which would then notice small and ignore read-only as it sort
of does at present in the categoization function.
r~