• Matt Fleming's avatar
    ftrace: Only update $offset when we update $ref_func · bd171d5f
    Matt Fleming authored
    The value of $offset should be the offset of $ref_func from the
    beginning of the object file. Therefore, we should set both variables
    together.
    
    This fixes a bug I was hitting on sh where $offset (which is used to
    calcualte the addends for the __mcount_loc entries) was being set
    multiple times and didn't correspond to $ref_func's offset in the object
    file. The addends in __mcount_loc were calculated incorrectly, resulting
    in ftrace dynamically modifying addresses that weren't mcount call
    sites.
    Signed-off-by: default avatarMatt Fleming <matt@console-pimps.org>
    LKML-Reference: <1248365775-25196-2-git-send-email-matt@console-pimps.org>
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    bd171d5f
recordmcount.pl 14 KB