Michael Ellerman wrote:
Christophe Leroy <christophe.le...@csgroup.eu> writes:
Le 05/05/2023 à 09:18, Nicholas Piggin a écrit :
This series has the steps to remove ELFv1 from the kernel build.
Patch 1 is a build fix, 2 defaults everything to ELFv2, 3 is
really a separate issue that concerns userspace. 4 removes v1
support.

Super glad to see this!


I see CONFIG_MPROFILE_KERNEL is restricted to LITTLE_ENDIAN. Is that correct ? Don't we have mprofile_kernel as well on BIG ENDIAN once switched to ABI v2 ? If so, can we drop the -pg based profiling completely, or is CLANG still not supporting mprofile_kernel ?

Clang does not support -mprofile-kernel.

AIUI they would like us to switch to -fpatchable-function-entry which
could then be supported on GCC & clang.

That would be a nice cleanup but also a bunch of work that no one has
found time to do.

https://github.com/linuxppc/issues/issues/447
https://github.com/llvm/llvm-project/issues/57031

GCC's support for -fpatchable-function-entry needed fixes for ABIv2, which have landed in the recent v13.1 release. I am looking into adding support for that.



So for now we need to keep the -pg based version.

Indeed, but removing elf v1 support does help cleaning up and simplifying some of the tracing code. Much of the -pg code is already separate, so it should be easy to drop that once clang picks up support for -fpatchable-function-entry.


- Naveen

Reply via email to