mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:24:45 +01:00
riscv/ftrace: Add RECORD_MCOUNT support
Now recordmcount.pl recognizes RISC-V object files. For the mechanism to work, we have to disable the linker relaxation. Cc: Greentime Hu <greentime@andestech.com> Signed-off-by: Alan Kao <alankao@andestech.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
parent
0adb32858b
commit
a1d2a6b4ce
3 changed files with 9 additions and 0 deletions
|
|
@ -376,6 +376,11 @@ if ($arch eq "x86_64") {
|
|||
$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s__mcount\$";
|
||||
$type = ".quad";
|
||||
$alignment = 8;
|
||||
} elsif ($arch eq "riscv") {
|
||||
$function_regex = "^([0-9a-fA-F]+)\\s+<([^.0-9][0-9a-zA-Z_\\.]+)>:";
|
||||
$mcount_regex = "^\\s*([0-9a-fA-F]+):\\sR_RISCV_CALL\\s_mcount\$";
|
||||
$type = ".quad";
|
||||
$alignment = 2;
|
||||
} else {
|
||||
die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue