This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] C++ thunk section names
- From: Sriraman Tallam <tmsriram at google dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Teresa Johnson <tejohnson at google dot com>, David Li <davidxl at google dot com>
- Date: Mon, 19 May 2014 11:25:28 -0700
- Subject: Re: [PATCH] C++ thunk section names
- Authentication-results: sourceware.org; auth=none
- References: <CAAs8HmyUpsQTfEhWpCXRtq1JU81JxFXUtW7vtoWv5XKS_cQFxw at mail dot gmail dot com> <CAAs8Hmxjv5jNdt3jKiocjWP8nfYFGJntSxZe=W0gfLmh4RTCOg at mail dot gmail dot com>
On Thu, Apr 17, 2014 at 10:41 AM, Sriraman Tallam <firstname.lastname@example.org> wrote:
> On Wed, Feb 5, 2014 at 4:31 PM, Sriraman Tallam <email@example.com> wrote:
>> I would like this patch reviewed and considered for commit when
>> Stage 1 is active again.
>> Patch Description:
>> A C++ thunk's section name is set to be the same as the original function's
>> section name for which the thunk was created in order to place the two
>> together. This is done in cp/method.c in function use_thunk.
>> However, with function reordering turned on, the original function's section
>> name can change to something like ".text.hot.<orginal>" or
>> ".text.unlikely.<original>" in function default_function_section in varasm.c
>> based on the node count of that function. The thunk function's section name
>> is not updated to be the same as the original here and also is not always
>> correct to do it as the original function can be hotter than the thunk.
>> I have created a patch to not name the thunk function's section to be the same
>> as the original function when function reordering is enabled.