From: Andrew Morton <akpm@osdl.org>
To: blaisorblade@yahoo.it
Cc: jdike@addtoit.com, linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net,
blaisorblade@yahoo.it, ak@suse.de
Subject: Re: [patch 1/1] x86_64: make string func definition work as intended
Date: Tue, 3 May 2005 00:21:26 -0700 [thread overview]
Message-ID: <20050503002126.1f40f5bf.akpm@osdl.org> (raw)
In-Reply-To: <20050501190851.5FD5B45EBB@zion>
blaisorblade@yahoo.it wrote:
>
> In include/asm-x86_64/string.h there are such comments:
>
> /* Use C out of line version for memcmp */
> #define memcmp __builtin_memcmp
> int memcmp(const void * cs,const void * ct,size_t count);
>
> This would mean that if the compiler does not decide to use __builtin_memcmp,
> it emits a call to memcmp to be satisfied by the C out-of-line version in
> lib/string.c. What happens is that after preprocessing, in lib/string.i you
> may find the definition of "__builtin_strcmp".
>
> Actually, by accident, in the object you will find the definition of
> strcmp and such (maybe a trick intended to redirect calls to __builtin_memcmp
> to the default memcmp when the definition is not expanded); however, this
> particular case is not a documented feature as far as I can see.
>
> Also, the EXPORT_SYMBOL does not work, so it's duplicated in the arch.
This breaks the x86 build. I guess the below is right.
You wanna check other architectures please?
diff -puN arch/i386/kernel/i386_ksyms.c~x86_64-make-string-func-definition-work-as-intended-fix arch/i386/kernel/i386_ksyms.c
--- 25/arch/i386/kernel/i386_ksyms.c~x86_64-make-string-func-definition-work-as-intended-fix 2005-05-03 00:16:36.000000000 -0700
+++ 25-akpm/arch/i386/kernel/i386_ksyms.c 2005-05-03 00:16:44.000000000 -0700
@@ -169,10 +169,6 @@ EXPORT_SYMBOL(rtc_lock);
EXPORT_SYMBOL_GPL(set_nmi_callback);
EXPORT_SYMBOL_GPL(unset_nmi_callback);
-#undef memcmp
-extern int memcmp(const void *,const void *,__kernel_size_t);
-EXPORT_SYMBOL(memcmp);
-
EXPORT_SYMBOL(register_die_notifier);
#ifdef CONFIG_HAVE_DEC_LOCK
EXPORT_SYMBOL(_atomic_dec_and_lock);
_
prev parent reply other threads:[~2005-05-03 7:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-01 19:08 blaisorblade
2005-05-02 16:41 ` Andi Kleen
[not found] ` <20050501155327.GX3592@stusta.de>
2005-05-02 19:36 ` Setting the hardware clock together with the system one(was: Re: [patch 1/1] x86_64: make string func definition work as intended) Blaisorblade
2005-05-02 22:00 ` Adrian Bunk
2005-05-03 7:21 ` Andrew Morton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050503002126.1f40f5bf.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=ak@suse.de \
--cc=blaisorblade@yahoo.it \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome