Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753657Ab3DLPIo (ORCPT ); Fri, 12 Apr 2013 11:08:44 -0400 Received: from mail-la0-f49.google.com ([209.85.215.49]:42540 "EHLO mail-la0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752943Ab3DLPIn (ORCPT ); Fri, 12 Apr 2013 11:08:43 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 12 Apr 2013 18:08:41 +0300 Message-ID: Subject: Re: memcmp in modules From: Andy Shevchenko To: "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1074 Lines: 39 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 ... 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/