[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vfh6Bpk4j3crVEAo3UtJEqpyucbQw+AzJvO85uRJ6gVgg@mail.gmail.com>
Date: Fri, 12 Apr 2013 18:08:41 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: memcmp in modules
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists