x86/error_inject: Make just_return_func() globally visible

"Linux Kernel Mailing List" <[email protected]> Thu, 15 Feb 2018 01:48:52 +0000 (UTC)
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/01684e72f16727e6ae0aeb1392f478e11ec5b8f7
Commit:     01684e72f16727e6ae0aeb1392f478e11ec5b8f7
Parent:     c25d99d20ba69824a1e2cc118e04b877cd427afc
Refname:    refs/heads/master
Author:     Arnd Bergmann <[email protected]>
AuthorDate: Fri Feb 2 15:56:19 2018 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue Feb 13 14:33:35 2018 +0100

    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: 540adea3809f ("error-injection: Separate error-injection from kprobe")
    Link: http://lkml.kernel.org/r/[email protected]
    Signed-off-by: Ingo Molnar <[email protected]>
---
 arch/x86/lib/error-inject.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/lib/error-inject.c b/arch/x86/lib/error-inject.c
index 7b881d03d0dd..3cdf06128d13 100644
--- a/arch/x86/lib/error-inject.c
+++ b/arch/x86/lib/error-inject.c
@@ -7,6 +7,7 @@ asmlinkage void just_return_func(void);
 
 asm(
 	".type just_return_func, @function\n"
+	".globl just_return_func\n"
 	"just_return_func:\n"
 	"	ret\n"
 	".size just_return_func, .-just_return_func\n"
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html