Re: [powerpc] ftrace warning kernel/trace/ftrace.c:2068 with code-patching selftests

From: Steven Rostedt
Date: Thu Jan 27 2022 - 07:46:08 EST


On Thu, 27 Jan 2022 12:27:04 +0000
Mark Rutland <mark.rutland@xxxxxxx> wrote:

> Ah, so those non-ELF relocations for the mcount_loc table just mean "apply the
> KASLR offset here", which is equivalent for all entries.
>
> That makes sense, thanks!

And this is why we were having such a hard time understanding each other ;-)

I started a new project called "shelf", which is a shell interface to
read ELF files (Shelf on a ELF!).

It uses my ccli library:

https://github.com/rostedt/libccli

and can be found here:

https://github.com/rostedt/shelf

Build and install the latest libccli and then build this with just
"make".

$ shelf vmlinux

and then you can see what is stored in the mcount location:

shelf> dump symbol __start_mcount_loc - __stop_mcount_loc

I plan on adding more to include the REL and RELA sections and show how
they affect symbols and such.

Feel free to contribute too ;-)

-- Steve