From ce1831fe2febf7a3a03fda43b41d7589caa022cd Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Sun, 12 Feb 2023 20:32:04 +0100 Subject: um: add __weak for exported functions If the exported glibc functions don't exist, we get link failures. Avoid that by adding __weak so they're allowed to not exist. Reported-by: Randy Dunlap Signed-off-by: Johannes Berg Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Richard Weinberger --- arch/um/os-Linux/user_syms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/um/os-Linux') diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c index fd575ecbcaec..54722c7f884f 100644 --- a/arch/um/os-Linux/user_syms.c +++ b/arch/um/os-Linux/user_syms.c @@ -39,7 +39,7 @@ EXPORT_SYMBOL(printf); * good; so the versions of these symbols will always match */ #define EXPORT_SYMBOL_PROTO(sym) \ - int sym(void); \ + int sym(void) __weak; \ EXPORT_SYMBOL(sym); extern void readdir64(void) __attribute__((weak)); -- cgit v1.2.3