lkml.org 
[lkml]   [2022]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/2] recordmcount: Handle sections with no non-weak symbols
    On Wed, 27 Apr 2022 15:01:22 +0530
    "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:

    > If one or both of these weak functions are overridden in future, in the
    > final vmlinux mcount table, references to these will change over to the
    > non-weak variant which has its own mcount location entry. As such, there
    > will now be two entries for these functions, both pointing to the same
    > non-weak location.

    But is that really true in all cases? x86 uses fentry these days, and other
    archs do things differently too. But the original mcount (-pg) call
    happened *after* the frame setup. That means the offset of the mcount call
    would be at different offsets wrt the start of the function. If you have
    one of these architectures that still use mcount, and the weak function
    doesn't have the same size frame setup as the overriding function, then the
    addresses will not be the same.

    -- Steve


    > We don't need the non-weak locations since they will
    > never be executed. Ftrace skips the duplicate entries due to a previous
    > commit.

    \
     
     \ /
      Last update: 2022-04-27 15:55    [W:2.614 / U:0.436 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site