mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
ANDROID: kbuild: fix dynamic ftrace with clang LTO
With CONFIG_LTO_CLANG enabled, LLVM IR won't be compiled into object files until modpost_link. This change postpones calls to recordmcount until after this step. In order to exclude ftrace_process_locs from inspection, we add a new code section .text..ftrace, which we tell recordmcount to ignore, and a __norecordmcount attribute for moving functions to this section. Bug: 145210207 Change-Id: Ib77f7c431fce54243c46d584b55761ed2342965c Signed-off-by: Sami Tolvanen <[email protected]>
This commit is contained in:
parent
2e39b40dd2
commit
d671af5fd7
9 changed files with 52 additions and 5 deletions
|
|
@ -590,7 +590,7 @@ config LTO_CLANG
|
|||
bool "Use Clang's Link Time Optimization (LTO) (EXPERIMENTAL)"
|
||||
depends on ARCH_SUPPORTS_LTO_CLANG
|
||||
depends on !KASAN
|
||||
depends on !FTRACE_MCOUNT_RECORD
|
||||
depends on !FTRACE_MCOUNT_RECORD || HAVE_C_RECORDMCOUNT
|
||||
depends on CC_IS_CLANG && CLANG_VERSION >= 100000 && LD_IS_LLD
|
||||
select LTO
|
||||
help
|
||||
|
|
|
|||
Loading…
Reference in a new issue