Bug 216211 - Mudflap doesn't work
Mudflap doesn't work
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
6
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-17 15:18 EST by Nigel Horne
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-17 15:32:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nigel Horne 2006-11-17 15:18:17 EST
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:
Comment 1 Jakub Jelinek 2006-11-17 15:32:44 EST
It works just fine, but you forgot to link with -lmudflap or -lmudflapth.
See
http://gcc.gnu.org/wiki/Mudflap%20Pointer%20Debugging
for details.

Note You need to log in before you can comment on or make changes to this bug.