From 9d907f1ae80b8a67d5397e26912b9d56d0b70a02 Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Fri, 24 Apr 2020 15:40:43 -0500 Subject: samples/ftrace: Fix asm function ELF annotations Enable objtool coverage for the sample ftrace modules by adding ELF annotations to the asm trampoline functions. samples/ftrace/ftrace-direct.o: warning: objtool: .text+0x0: unreachable instruction samples/ftrace/ftrace-direct-modify.o: warning: objtool: .text+0x0: unreachable instruction samples/ftrace/ftrace-direct-too.o: warning: objtool: .text+0x0: unreachable instruction Reported-by: Randy Dunlap Signed-off-by: Josh Poimboeuf --- samples/ftrace/ftrace-direct.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'samples/ftrace/ftrace-direct.c') diff --git a/samples/ftrace/ftrace-direct.c b/samples/ftrace/ftrace-direct.c index a2e3063bd306..63ca06d42c80 100644 --- a/samples/ftrace/ftrace-direct.c +++ b/samples/ftrace/ftrace-direct.c @@ -13,6 +13,7 @@ extern void my_tramp(void *); asm ( " .pushsection .text, \"ax\", @progbits\n" +" .type my_tramp, @function\n" " my_tramp:" " pushq %rbp\n" " movq %rsp, %rbp\n" @@ -21,6 +22,7 @@ asm ( " popq %rdi\n" " leave\n" " ret\n" +" .size my_tramp, .-my_tramp\n" " .popsection\n" ); -- cgit v1.2.3-59-g8ed1b