Am Sonntag 12 Juni 2011, 23:52:35 schrieb Florian Fainelli:
> Le dimanche 12 juin 2011 13:56:14, Richard Weinberger a écrit :
> > Am Sonntag 12 Juni 2011, 13:14:41 schrieb Florian Fainelli:
> > > From: Nicolas Thill <n...@openwrt.org>
> > >
> > > Ubuntu 8.10 and newer enable compile-time buffer checks by default,
> > >
> > > which can sometime cause build failures like this:
> > > LD vmlinux
> > > SYSMAP System.map
> > > SYSMAP .tmp_System.map
> > > LINK linux
> > > Building modules, stage 2.
> > > MODPOST 51 modules
> > >
> > > ERROR: "__sprintf_chk" [arch/um/drivers/harddog.ko] undefined!
> >
> > Hmm, now I'm wondering why no other Ubuntu users have noticed this.
> > Are also current versions of Ubuntu affected?
>
> Without this patch, I get the exact same modpost error on Ubuntu 11.04:
Okay, found the real problem.
We have to export the *_chk functions.
Nobody noticed it because most UML kernels are CONFIG_MODULES=n
and harddog.ko is not part of the defaultconfig.
Can you please test the attached patch?
Thanks,
//richard
diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c
index 05f5ea8..9e71e7e 100644
--- a/arch/um/os-Linux/user_syms.c
+++ b/arch/um/os-Linux/user_syms.c
@@ -18,6 +18,9 @@ extern void *memmove(void *, const void *, size_t);
extern void *memset(void *, int, size_t);
extern int printf(const char *, ...);
+extern int __sprintf_chk(char *str, int flag, size_t strlen, const char *format);
+EXPORT_SYMBOL(__sprintf_chk);
+
/* If it's not defined, the export is included in lib/string.c.*/
#ifdef __HAVE_ARCH_STRSTR
EXPORT_SYMBOL(strstr);
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel