mudflapth - undefined symbol: main

John Carter
Mon Mar 17 21:07:00 GMT 2008

On Sun, 16 Mar 2008, wrote:

> Do you have -fvisibility=hidden on the compile line?
> Try removing it.  Solved the issue for me.

Unfortunately no, I haven't got -fvisibility on the command line.

I even tried to explicitly disable it with -fvisibility=default

No luck.

Curiously enough the libmudflap code explicitly refers to
   extern int main();
in gcc/libmudflap/mf-runtime.c
__wrap_main (int argc, char* argv[])
   extern char **environ;
   extern int main ();
   extern int __real_main ();
   static int been_here = 0;

The object code under test has a "main" defined, but once it's linked... it disappears.


John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email :
New Zealand

More information about the Gcc-help mailing list