SOLVED! Re: mudflapth - undefined symbol: main

John Carter john.carter@tait.co.nz
Mon Mar 17 22:55:00 GMT 2008


On Fri, 14 Mar 2008, John Carter wrote:

> I'm trying to get mudflap going on i686-pc-linux-gnu-gcc (GCC) 4.2.3
>
> I use -fmudflapth on compiling and linking and -lmudflapth on linking.
>
>
> When I run it I get....
> LD_LIBRARY_PATH=/opt/i686-pc-linux-gnu/lib:/usr/lib:/lib ~/ffoo
> /home/johnc/ffoo: symbol lookup error: 
> /opt/i686-pc-linux-gnu/lib/libmudflapth.so.0: undefined symbol: main

Ha! Solved!

Since our primary target is an embedded system (where we're trying
hard to save flash/ram space) I had '-Wl,--gc-sections'

If I removed that, the problem went away....

To be replaced by reentrancy error.....

But that was solved by LD_PRELOAD=/path/to/libmudflapth.so.0

John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : john.carter@tait.co.nz
New Zealand



More information about the Gcc-help mailing list