iPXE
implicit.c
Go to the documentation of this file.
00001 /** @file
00002  *
00003  * gcc sometimes likes to insert implicit calls to memcpy() and
00004  * memset().  Unfortunately, there doesn't seem to be any way to
00005  * prevent it from doing this, or to force it to use the optimised
00006  * versions as seen by C code; it insists on inserting symbol
00007  * references to "memcpy" and "memset".  We therefore include wrapper
00008  * functions just to keep gcc happy.
00009  *
00010  */
00011 
00012 #include <string.h>
00013 
00014 void * gcc_implicit_memcpy ( void *dest, const void *src,
00015                              size_t len ) asm ( "memcpy" );
00016 
00017 void * gcc_implicit_memcpy ( void *dest, const void *src, size_t len ) {
00018         return memcpy ( dest, src, len );
00019 }
00020 
00021 void * gcc_implicit_memset ( void *dest, int character,
00022                              size_t len ) asm ( "memset" );
00023 
00024 void * gcc_implicit_memset ( void *dest, int character, size_t len ) {
00025         return memset ( dest, character, len );
00026 }