This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
SOLVED! Re: mudflapth - undefined symbol: main
- From: John Carter <john dot carter at tait dot co dot nz>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 18 Mar 2008 11:54:56 +1300 (NZDT)
- Subject: SOLVED! Re: mudflapth - undefined symbol: main
- References: <Pine.LNX.4.64.0803141055030.26005@parore.tait.co.nz>
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