Description of problem: [njh@philips tmp]$ cc -fmudflap f.c /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../crt1.o: In function `_start': (.text+0x18): undefined reference to `__wrap_main' /tmp/ccMZcidj.o: In function `main': f.c:(.text+0x19): undefined reference to `__mfwrap_printf' /tmp/ccMZcidj.o: In function `global constructors keyed to 0_main': f.c:(.text+0x2d): undefined reference to `__mf_init' f.c:(.text+0x51): undefined reference to `__mf_register' collect2: ld returned 1 exit status [njh@philips tmp]$ cat f.c #include <stdio.h> main() { printf("hello, world\n"); } [njh@philips tmp]$ Version-Release number of selected component (if applicable): libmudflap-4.1.1-30 How reproducible: everytime Steps to Reproduce: 1. create hello world program 2. cc -fmudflap program 3. Actual results: /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../crt1.o: In function `_start': (.text+0x18): undefined reference to `__wrap_main' /tmp/ccMZcidj.o: In function `main': f.c:(.text+0x19): undefined reference to `__mfwrap_printf' /tmp/ccMZcidj.o: In function `global constructors keyed to 0_main': f.c:(.text+0x2d): undefined reference to `__mf_init' f.c:(.text+0x51): undefined reference to `__mf_register' collect2: ld returned 1 exit status Expected results: Should link Additional info:
It works just fine, but you forgot to link with -lmudflap or -lmudflapth. See http://gcc.gnu.org/wiki/Mudflap%20Pointer%20Debugging for details.