Skip to content

Commit

Permalink
nds32/ftrace: Add RECORD_MCOUNT support
Browse files Browse the repository at this point in the history
Recognize NDS32 object files in recordmcount.pl.

Signed-off-by: Zong Li <zong@andestech.com>
Acked-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
  • Loading branch information
Zong Li authored and Greentime Hu committed Sep 4, 2018
1 parent 1e9b14c commit fbf58a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/nds32/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ config NDS32
select THREAD_INFO_IN_TASK
select HAVE_FUNCTION_TRACER
select HAVE_FUNCTION_GRAPH_TRACER
select HAVE_FTRACE_MCOUNT_RECORD
help
Andes(nds32) Linux support.

Expand Down
3 changes: 3 additions & 0 deletions scripts/recordmcount.pl
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ sub check_objcopy
$mcount_regex = "^\\s*([0-9a-fA-F]+):\\sR_RISCV_CALL\\s_mcount\$";
$type = ".quad";
$alignment = 2;
} elsif ($arch eq "nds32") {
$mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_NDS32_HI20_RELA\\s+_mcount\$";
$alignment = 2;
} else {
die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD";
}
Expand Down

0 comments on commit fbf58a5

Please sign in to comment.