Skip to content

Commit ce1831f

Browse files
jmberg-intelrichardweinberger
authored andcommitted
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 <rdunlap@infradead.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent 7e364e5 commit ce1831f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/um/os-Linux/user_syms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ EXPORT_SYMBOL(printf);
3939
* good; so the versions of these symbols will always match
4040
*/
4141
#define EXPORT_SYMBOL_PROTO(sym) \
42-
int sym(void); \
42+
int sym(void) __weak; \
4343
EXPORT_SYMBOL(sym);
4444

4545
extern void readdir64(void) __attribute__((weak));

0 commit comments

Comments
 (0)