This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: memcpy


Pete Popov wrote:
[snip 8< ]
> I've got my own version
> of "memcpy" and a few other routines;
> however, for some reason, the compiler
> chooses to insert the standard libc
> memcpy in some of the files.  Thus, some
> files get my version of memcpy, and
> other get the libc version.

I don't think its actually the libc version that's being included. If you
look at the man page for gcc you will find that gcc itself provides builtin
versions of _exit, abort, abs, alloca, cos, exit, fabs, labs, memcmp,
memcpy, sin, sqrt, strcmp, strcpy, and strlen.

To avoid this behaviour try either -fno-builtins or -mmemcpy (I haven't
tried these though so YMMV).

Jonathan L.
-- 
Cygnus Solutions, 35 Cambridge Place, Cambridge, UK.  Tel: +44 (1223) 728762
"It is impossible to enjoy idling thoroughly unless||Home e-mail: jifl @ 
one has plenty of work to do - Jerome K. Jerome"   ||     jifvik.demon.co.uk
Help fight spam! http://spam.abuse.net/  These opinions are all my own fault