summaryrefslogtreecommitdiffstats
path: root/samples/ftrace/ftrace-direct-too.c
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2020-04-24 15:40:43 -0500
committerJosh Poimboeuf <jpoimboe@redhat.com>2020-05-20 08:30:43 -0500
commit9d907f1ae80b8a67d5397e26912b9d56d0b70a02 (patch)
tree41f4d1ad71da46105e5eb5de02fbb60416ee5979 /samples/ftrace/ftrace-direct-too.c
parent7c0577f4e609f7278ebd6d21e2de82b42f110944 (diff)
downloadlinux-9d907f1ae80b8a67d5397e26912b9d56d0b70a02.tar.bz2
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 <rdunlap@infradead.org> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Diffstat (limited to 'samples/ftrace/ftrace-direct-too.c')
-rw-r--r--samples/ftrace/ftrace-direct-too.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/samples/ftrace/ftrace-direct-too.c b/samples/ftrace/ftrace-direct-too.c
index 27efa5f6ff52..d5c5022be664 100644
--- a/samples/ftrace/ftrace-direct-too.c
+++ b/samples/ftrace/ftrace-direct-too.c
@@ -15,6 +15,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"
@@ -27,6 +28,7 @@ asm (
" popq %rdi\n"
" leave\n"
" ret\n"
+" .size my_tramp, .-my_tramp\n"
" .popsection\n"
);