[PATCH v2 2/2] ftrace: recordmcount: Handle sections with no non-weak symbols
Steven Rostedt
rostedt at goodmis.org
Fri Apr 29 08:42:12 AEST 2022
On Thu, 28 Apr 2022 22:49:52 +0530
"Naveen N. Rao" <naveen.n.rao at linux.vnet.ibm.com> wrote:
> But, with ppc64 elf abi v1 which only supports the old -pg flag, mcount
> location can differ between the weak and non-weak variants of a
> function. In such scenarios, one of the two mcount entries will be
> invalid. Such architectures need to validate mcount locations by
> ensuring that the instruction(s) at those locations are as expected. On
> powerpc, this can be a simple check to ensure that the instruction is a
> 'bl'. This check can be further tightened as necessary.
I was thinking about this more, and I was thinking that we could create
another section; Perhaps __mcount_loc_weak. And place these in that
section. That way, we could check if these symbols to see if there's
already a symbol for it, and if there is, then drop it.
-- Steve
More information about the Linuxppc-dev
mailing list