This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] New fixes for hot/cold partitioning
- From: Ian Lance Taylor <ian at airs dot com>
- To: Caroline M Tice <ctice at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 04 Apr 2005 13:35:36 -0400
- Subject: Re: [PATCH] New fixes for hot/cold partitioning
- References: <0475F9A2-A52B-11D9-BC0C-0030656ADC2A@apple.com>
Caroline M Tice <ctice@apple.com> writes:
> > Caroline M Tice <ctice@apple.com> writes:
> >
> >> - It changes unlikely_text_section_name from a char* to an array;
> >> initializes it appropriately, changes all uses of it to reflect the
> >> new format; and removes the call to free it.
> >
> > I missed the reasons for making this change, but it looks questionable
> > to me. It's not hard to construct C++ templates in which section
> > names are identical in the first 256 characters.
>
> What would be a reasonable size limit to use then?
It's not clear to me why you need a size limit at all, at least not a
limit which is target independent. There is no limit on the length of
section names in ELF. For any given limit, it wouldn't be hard to
construct a C++ test case which used longer section names. I'm not
sure, but I think it would be possible to construct a case which would
fail, in which different .o files instantiated different sets of
template functions, thus leading to different code in otherwise
identically named .linkonce sections.
If you need a size limit for some reason that I don't see, perhaps you
should turn off hot/cold partioning in sections whose names are too
long.
Ian