This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa mudflap] preferred technique for wrapping symbols?


On Tuesday, August 13, 2002, at 01:37 , graydon@redhat.com wrote:

-graydon

Index: gcc/gcc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcc.c,v
retrieving revision 1.324.2.7
diff -u -r1.324.2.7 gcc.c
--- gcc/gcc.c 12 Aug 2002 01:33:16 -0000 1.324.2.7
+++ gcc/gcc.c 13 Aug 2002 17:19:34 -0000
@@ -555,7 +555,15 @@

#ifndef MFLIB_SPEC
/* XXX hack */
-#define MFLIB_SPEC " %{fmudflap: --wrap=malloc --wrap=free --wrap=calloc --wrap=realloc -lmudflap}"
+#define MFLIB_SPEC " %{fmudflap: --wrap=malloc --wrap=free" \
+" --wrap=calloc --wrap=realloc --wrap=memcpy --wrap=memmove" \
+" --wrap=memset --wrap=memcmp --wrap=memchr --wrap=memrchr" \
+" --wrap=strcpy --wrap=strncpy --wrap=strcat --wrap=strncat" \
+" --wrap=strcmp --wrap=strcasecmp --wrap=strncmp --wrap=strncasecmp" \
+" --wrap=strdup --wrap=strndup --wrap=strchr --wrap=strrchr" \
+" --wrap=strstr --wrap=memmem --wrap=strlen --wrap=strnlen" \
+" --wrap=bzero --wrap=bcopy --wrap=bcmp --wrap=index --wrap=rindex" \
+" -lmudflap}"
#endif

/* config.h can define LIBGCC_SPEC to override how and when libgcc.a is

Just a question: is the code that is in gcc.c supposed to be compatible with K+R C?
If so try to get around string concatenate, look at cc1_options in gcc.c for how do it right.

Thanks,
Andrew Pinski


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