Skip to contentSkip to conversation

UML - Fix string exporting on UML/i386

PATCH New Jeff Dike 1 participant 1 message Jul 23, 2007 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 1/3 UML - Fix string exporting on UML/i386

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.

--

 arch/um/os-Linux/user_syms.c |    5 +----
 arch/um/sys-i386/Makefile    |    2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)
arch/um/sys-i386/Makefile +1 -1
Index: linux-2.6.17/arch/um/sys-i386/Makefile
===================================================================
@@ -4,7 +4,7 @@ obj-y = bug.o bugs.o checksum.o delay.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
 
arch/um/os-Linux/user_syms.c +1 -4
Index: linux-2.6.17/arch/um/os-Linux/user_syms.c
===================================================================
@@ -19,10 +19,7 @@ extern void *memmove(void *, const void 
 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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel