]> git.baikalelectronics.ru Git - kernel.git/commit
scripts/recordmcount.pl: Fix RISC-V regex for clang
authorNathan Chancellor <nathan@kernel.org>
Thu, 25 Mar 2021 22:38:05 +0000 (15:38 -0700)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Mon, 26 Apr 2021 15:25:00 +0000 (08:25 -0700)
commit08d221d37f6c6649bee9f3e79a7e59a64401ea87
tree5d0890ca63ab3757ac2b4c4778435f6c2fea1ec7
parentaa0c6f8b76ae13b558a157a34fe1b812187fcc32
scripts/recordmcount.pl: Fix RISC-V regex for clang

Clang can generate R_RISCV_CALL_PLT relocations to _mcount:

$ llvm-objdump -dr build/riscv/init/main.o | rg mcount
                000000000000000e:  R_RISCV_CALL_PLT     _mcount
                000000000000004e:  R_RISCV_CALL_PLT     _mcount

After this, the __start_mcount_loc section is properly generated and
function tracing still works.

Link: https://github.com/ClangBuiltLinux/linux/issues/1331
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Fangrui Song <maskray@google.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
scripts/recordmcount.pl