Skip to content

Commit

Permalink
uml: fix string exporting on UML/i386
Browse files Browse the repository at this point in the history
In 2.6.23-rc1, i386 fiddled its string support such that UML started getting
undefined references from modules.  The UML asm/string.h was including the
i386 string.h, which defined __HAVE_ARCH_STR*, but the corresponding
implementations weren't being pulled in.

This is fixed by adding arch/i386/lib/string.h to the list of host
architecture files to be pulled in to UML.

A complication is that the libc exports file assumed that the generic strlen
and strstr weren't in use (i.e.  __HAVE_ARCH_STR is defined), then they aren't
exported.  This is untrue for strlen, which is exported in either case, so
this logic is not needed.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Jul 24, 2007
1 parent 0d786d4 commit 1a65f49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions arch/um/os-Linux/user_syms.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ extern void *memmove(void *, const void *, size_t);
extern void *memset(void *, int, size_t);
extern int printf(const char *, ...);

/* If they're not defined, the export is included in lib/string.c.*/
#ifdef __HAVE_ARCH_STRLEN
EXPORT_SYMBOL(strlen);
#endif
/* If it's not defined, the export is included in lib/string.c.*/
#ifdef __HAVE_ARCH_STRSTR
EXPORT_SYMBOL(strstr);
#endif
Expand Down
2 changes: 1 addition & 1 deletion arch/um/sys-i386/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ obj-y = bug.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \

obj-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o

subarch-obj-y = lib/bitops.o lib/semaphore.o
subarch-obj-y = lib/bitops.o lib/semaphore.o lib/string.o
subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem.o
subarch-obj-$(CONFIG_MODULES) += kernel/module.o

Expand Down

0 comments on commit 1a65f49

Please sign in to comment.