lkml.org 
[lkml]   [2013]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: memcmp in modules
From
HI.

I have an issue with memcmp, but it seems I didn't get what is
happening there. Let's consider the details.

I have a module which has one call of memcmp and licensed as Dual BSD/GPL.

#include <linux/string.h>
...
if (memcmp(...))
...
MODULE_LICENSE("Dual BSD/GPL");

I compile it for ARCH=i386 together with kernel and try to load it.

modprobe test-string_helpers

[ 25.134433] test_string_helpers: no symbol version for memcmp
[ 25.140156] test_string_helpers: Unknown symbol memcmp (err -22)

Then I've changed string_32.h a bit (I think it's not a solution of the issue)

-#define memcmp __builtin_memcmp
+#define memcmp(a, b, n) __builtin_memcmp(a, b, n)

And in this case:
modprobe test_string_helpers
[ 15.391589] test_string_helpers: Running tests...

What did I miss?

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2013-04-12 17:21    [W:0.113 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site