Skip to content

Commit 01684e7

Browse files
arndbIngo Molnar
authored andcommitted
x86/error_inject: Make just_return_func() globally visible
With link time optimizations enabled, I get a link failure: ./ccLbOEHX.ltrans19.ltrans.o: In function `override_function_with_return': <artificial>:(.text+0x7f3): undefined reference to `just_return_func' Marking the symbol .globl makes it work as expected. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Masami Hiramatsu <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Josef Bacik <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Nicolas Pitre <[email protected]> Cc: Peter Zijlstra <[email protected]> Fixes: 540adea ("error-injection: Separate error-injection from kprobe") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent c25d99d commit 01684e7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/lib/error-inject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ asmlinkage void just_return_func(void);
77

88
asm(
99
".type just_return_func, @function\n"
10+
".globl just_return_func\n"
1011
"just_return_func:\n"
1112
" ret\n"
1213
".size just_return_func, .-just_return_func\n"

0 commit comments

Comments
 (0)