Public bug reported:
Hello,
Description:when trying to to compile C programs using the GNU C compiler,
-fmudflap seems to stop legal c programs from turning into binaries.
1) Release :
ravi@psg-xl-buildd:~/harish/bug$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 10.10
Release:10.10
Codename: maverick
ravi@psg-xl-buildd:~/harish/bug$ cat /proc/version
Linux version 2.6.35-22-generic-pae (buildd@rothera) (gcc version 4.4.5
(Ubuntu/Linaro 4.4.4-14ubuntu4) ) #33-Ubuntu SMP Sun Sep 19 22:14:14 UTC 2010
2) Version of software running:
ravi@psg-xl-buildd:~/harish/bug$ dpkg -l | grep mudflap
ii libmudflap0 4.5.1-7ubuntu2GCC
mudflap shared support libraries
ii libmudflap0-4.4-dev 4.4.4-14ubuntu5 GCC
mudflap support libraries (development files)
ii libmudflap0-4.5-dev 4.5.1-7ubuntu2GCC
mudflap support libraries (development files)
ravi@psg-xl-buildd:~/harish/bug$ gcc -v
Using built-in specs.
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.4 --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic
--enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu
--target=i686-linux-gnu
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
3)What should happen:
Successful compilation of legal programs
4)What is happening:
A screen full of linker errors
5)Log
ravi@psg-xl-buildd:~/harish/bug$ cat test.c
#include stdio.h
int main()
{
return 0;
}
ravi@psg-xl-buildd:~/harish/bug$ gcc test.c
ravi@psg-xl-buildd:~/harish/bug$ echo $?
0
ravi@psg-xl-buildd:~/harish/bug$ gcc test.c -fmudflap -lmudflap
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`__mf_object_tree':
(.text.__mf_object_tree+0x4b): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`mfsplay_tree_foreach':
(.text.mfsplay_tree_foreach+0x27): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`mfsplay_tree_foreach':
(.text.mfsplay_tree_foreach+0x34): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`mfsplay_tree_foreach':
(.text.mfsplay_tree_foreach+0xe9): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`mfsplay_tree_foreach':
(.text.mfsplay_tree_foreach+0xf1): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`mfsplay_tree_splay':
(.text.mfsplay_tree_splay+0xb7): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`mfsplay_tree_splay':
(.text.mfsplay_tree_splay+0xe4): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`__mf_watch_or_not':
(.text.__mf_watch_or_not+0x74): undefined reference to `__real_malloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`__mf_watch_or_not':
(.text.__mf_watch_or_not+0xfa): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`__mf_backtrace':
(.text.__mf_backtrace+0x26): undefined reference to `__real_calloc'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`__mf_backtrace':
(.text.__mf_backtrace+0x7c): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`__mf_violation':
(.text.__mf_violation+0x68f): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`__mfu_unregister':
(.text.__mfu_unregister+0x1dd): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`__mfu_unregister':
(.text.__mfu_unregister+0x287): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`__mfu_unregister':
(.text.__mfu_unregister+0x2a0): undefined reference to `__real_free'
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o):(.text.__mfu_unregister+0x2c0):
more undefined references to `__real_free' follow
/usr/lib/gcc/i686-linux-gnu/4.4.5/libmudflap.a(mf-runtime.o): In function
`__mfu_register':