objtool: Add a pass for generating __mcount_loc
Add the --mcount option for generating __mcount_loc sections needed for dynamic ftrace. Using this pass requires the kernel to be compiled with -mfentry and CC_USING_NOP_MCOUNT to be defined in Makefile. Link: https://lore.kernel.org/lkml/20200625200235.GQ4781@hirez.programming.kicks-ass.net/ Signed-off-by:Peter Zijlstra <peterz@infradead.org> [Sami: rebased, dropped config changes, fixed to actually use --mcount, and wrote a commit message.] Signed-off-by:
Sami Tolvanen <samitolvanen@google.com> Reviewed-by:
Kees Cook <keescook@chromium.org>
Showing
- tools/objtool/builtin-check.c 2 additions, 1 deletiontools/objtool/builtin-check.c
- tools/objtool/builtin.h 1 addition, 1 deletiontools/objtool/builtin.h
- tools/objtool/check.c 82 additions, 0 deletionstools/objtool/check.c
- tools/objtool/check.h 1 addition, 0 deletionstools/objtool/check.h
- tools/objtool/objtool.c 1 addition, 0 deletionstools/objtool/objtool.c
- tools/objtool/objtool.h 1 addition, 0 deletionstools/objtool/objtool.h
Loading
Please register or sign in to comment