|
@@ -0,0 +1,26 @@
|
|
1
|
+/** @file
|
|
2
|
+ *
|
|
3
|
+ * gcc sometimes likes to insert implicit calls to memcpy() and
|
|
4
|
+ * memset(). Unfortunately, there doesn't seem to be any way to
|
|
5
|
+ * prevent it from doing this, or to force it to use the optimised
|
|
6
|
+ * versions as seen by C code; it insists on inserting symbol
|
|
7
|
+ * references to "memcpy" and "memset". We therefore include wrapper
|
|
8
|
+ * functions just to keep gcc happy.
|
|
9
|
+ *
|
|
10
|
+ */
|
|
11
|
+
|
|
12
|
+#include <string.h>
|
|
13
|
+
|
|
14
|
+void * gcc_implicit_memcpy ( void *dest, const void *src,
|
|
15
|
+ size_t len ) asm ( "memcpy" );
|
|
16
|
+
|
|
17
|
+void * gcc_implicit_memcpy ( void *dest, const void *src, size_t len ) {
|
|
18
|
+ return memcpy ( dest, src, len );
|
|
19
|
+}
|
|
20
|
+
|
|
21
|
+void * gcc_implicit_memset ( void *dest, int character,
|
|
22
|
+ size_t len ) asm ( "memset" );
|
|
23
|
+
|
|
24
|
+void * gcc_implicit_memset ( void *dest, int character, size_t len ) {
|
|
25
|
+ return memset ( dest, character, len );
|
|
26
|
+}
|