This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
RE: optimization/3329: optimization large memory copies uses kern el memcpy function without user's knowledge.
- From: "Araneda, Dorian" <dorian dot araneda at intel dot com>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 2 Apr 2002 22:36:01 -0000
- Subject: RE: optimization/3329: optimization large memory copies uses kern el memcpy function without user's knowledge.
- Reply-to: "Araneda, Dorian" <dorian dot araneda at intel dot com>
The following reply was made to PR optimization/3329; it has been noted by GNATS.
From: "Araneda, Dorian" <dorian.araneda@intel.com>
To: "'Richard Henderson'" <rth@redhat.com>
Cc: "'Andrew Pinski'" <pinskia@physics.uc.edu>,
"'rth@gcc.gnu.org'"<rth@gcc.gnu.org>,
"'gcc-bugs@gcc.gnu.org'" <gcc-bugs@gcc.gnu.org>,
"'gcc-prs@gcc.gnu.org'" <gcc-prs@gcc.gnu.org>,
"'nobody@gcc.gnu.org'"<nobody@gcc.gnu.org>,
"'gcc-gnats@gcc.gnu.org'" <gcc-gnats@gcc.gnu.org>
Subject: RE: optimization/3329: optimization large memory copies uses kern
el memcpy function without user's knowledge.
Date: Tue, 2 Apr 2002 14:29:35 -0800
this may be the case, but I don't think
a developer should know the kernel-hacking tricks
to get their code to be portable across kernels.
x=y;
is not intuitively interpreted as
memcpy(&x,y,sizeof(x));
I can assure you that if gcc did a survey of all
the developers using gcc, the vast majority
would not have realized this was occurring
in their code.
if this is not the case and I am a twink when
it comes to kernel development, gcc should still
be idiot proof. the compiler should not make
assumptions that the user is ok with linking
unapproved kernel function calls.
is simple, I don't appreciate a compiler feature
that goes behind my back to include code I did not
ask for.
It is like someone who thinks they are being
polite by pushing someone in a wheelchair because
they feel that they need the help.
It is not good etiquette to do that when that
person neither asked for help or gave permission
to be pushed.
gcc may have had good intentions but is still
not right to override the user's intent in that
way.
I do not see why it is so hard to understand
what I am trying to explain. It is not about
what method is better. It's about common courtesy
to the user.
-Dorian
-----Original Message-----
From: Richard Henderson [mailto:rth@redhat.com]
Sent: Tuesday, April 02, 2002 5:02 PM
To: Araneda, Dorian
Cc: 'Andrew Pinski'; 'rth@gcc.gnu.org'; 'gcc-bugs@gcc.gnu.org';
'gcc-prs@gcc.gnu.org'; 'nobody@gcc.gnu.org'; 'gcc-gnats@gcc.gnu.org'
Subject: Re: optimization/3329: optimization large memory copies uses
kern el memcpy function without user's knowledge.
There are two markups that export symbols from the kernel:
(1) EXPORT_SYMBOL
This is used for symbols with which there are no
restrictions for use.
(2) EXPORT_SYMBOL_GPL
This is used for symbols that may only be used with
modules that carry a GPL compatible license.
See linux/Documentation/DocBook/kernel-hacking.tmpl or
some post-processing thereof.
You will find that memcpy and all of the other gcc support
routines are exported with EXPORT_SYMBOL, and thus do not
contaminate your code.
r~