lkml.org 
[lkml]   [2013]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] modpost.c: Add .text.unlikely to TEXT_SECTIONS
Date
Tom Rini <trini@ti.com> writes:
> On 04/28/2013 10:59 PM, Rusty Russell wrote:
>> Tom Rini <trini@ti.com> writes:
>>
>>> Recent gcc's may place functions into the .text.unlikely section and we
>>> need to check this section as well for section mismatches now otherwise
>>> we may have false negatives for this test.
>>
>> Hmm, I don't think it's all that recent, is it? I can find it back to
>> gcc 4.0.4:
>>
>> `-freorder-functions'
>> Reorder functions in the object file in order to improve code
>> locality. This is implemented by using special subsections
>> `.text.hot' for most frequently executed functions and
>> `.text.unlikely' for unlikely executed functions. Reordering is
>> done by the linker so object file format must support named
>> sections and linker must place them in a reasonable way.
>>
>> Also profile feedback must be available in to make this option
>> effective. See `-fprofile-arcs' for details.
>>
>> Enabled at levels `-O2', `-O3', `-Os'.
>>
>> The comment is the same in in gcc 4.7.
>>
>> So is your real issue that this section is generated with
>> -fprofile-arcs, or has something changed with gcc 4.8, or...?
>
> I've started seeing this with Linaro based 4.7 toolchains. I can go
> back through their releases and see when it starts showing up there if
> it helps. I didn't add .text.hot as I didn't have that section at all,
> fwiw.

Weird, did you turn on CONFIG_GCOV_KERNEL? AFAICT you shouldn't see
this section without that.

Thanks,
Rusty.


\
 
 \ /
  Last update: 2013-05-01 07:41    [W:0.072 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site