From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Ivanov To: hjl@lucon.org (H.J. Lu) Cc: svivanov@pdmi.ras.ru, egcs@cygnus.com Subject: Re: Why link C with crtstuff? [patch] Date: Sun, 26 Apr 1998 12:45:00 -0000 Message-id: <199804262038.AAA17714@euclid.pdmi.ras.ru> References: X-SW-Source: 1998-04/msg01045.html > > The patch is wrong. Please try this patch. > Thanks. It works for all my primitive tests except one. I have a shared library compiled by gcc-2.8.1 (libvga-1.2.13, but this should not be important): ~/test$ nm -D /usr/lib/libvga.so.1 | grep register_frame_info 000164e0 T __deregister_frame_info 0001644c T __register_frame_info 00016498 T __register_frame_info_table I compile "main(){}" with -lvga. It works ok but: ~/test/oldvga$ nm -D a.out | grep register_frame_info U __deregister_frame_info U __register_frame_info Now I recompile the library and replace the old one: ~/test$ nm -D /usr/lib/libvga.so.1 | grep register_frame_info U __deregister_frame_info U __register_frame_info (btw, are they really need to be U, not just absent?) The binary stops working: ~/test/oldvga$ ./a.out ./a.out: can't resolve symbol '__register_frame_info' This is a kind of vicious circle. With an old-gcc made library, it's hard to compile a binary that will work with a new-gcc library. (old-gcc = without the patch, new-gcc = with the patch). Sergei