Re: [RFC][PATCH] ftrace,objtool: PC32 based __mcount_loc
From: Peter Zijlstra
Date: Fri Jun 17 2022 - 08:06:54 EST
On Fri, Jun 17, 2022 at 11:44:49AM +0000, Christophe Leroy wrote:
>
>
> Le 17/06/2022 à 13:24, Peter Zijlstra a écrit :
> >
> > Hi,
> >
> > I recently noticed that __mcount_loc is 64bit wide, containing absolute
> > addresses. Since __mcount_loc is a permanent section (not one we drop
> > after boot), this bloats the kernel memory usage for no real purpose.
>
> I guess you mean it is 64bit wide on 64 bits architectures ? Because it
> seems to be defined as 'long' so will be 32bit on 32 bits architectures ?
Right, it's an absolute address in the native size. Clearly I'm somewhat
64bit biassed :-)