I want to link the C++ standard libraries statically for my application
because I don't space for the .so files on my target platform.
After quite a bit of searching, I found very little information that
was helpful. The best information I found was at this link
http://fresco.org/~njs/c++-without-stdc++
I followed the approach here and used -nostdlib to disable the default
linking. Instead I use the options:
-lsupc++ -lgcc -lgcc_eh -lc -lgcc -lgcc_eh
where -lgcc -lgcc_eh has to be repeated twice for some reason.
In summary the linker options I used are
-Wl,-Bstatic -lsupc++ -lgcc -lgcc_eh -lc -lgcc -lgcc_eh
followed by -Wl,-Bdynamic to link dynamically with some other
libraries. The problem I found is this:
warning: cannot find entry symbol _start; defaulting to 000877e0
Can anyone suggest why this might be occurring? OR give me some
pointers to some useful information on the topic of static link for
C++?
Thanks,
DS.