Problem with linking ununsed symbols in a shared library

2005-04-04 Thread Shridhar Daithankar
Hi, First of all, sorry for posting the sources inline but I don't know if attachments are allowed on this list. I am not subscribed, so please CC to me. While porting a project from HP-UX to Linux I ran into this problem where the linker asks for all the dependent shared libraries, not only t

Re: Problem with linking ununsed symbols in a shared library

2005-04-05 Thread Shridhar Daithankar
On Tuesday 05 Apr 2005 1:17 am, Ian Lance Taylor wrote: > Shridhar Daithankar <[EMAIL PROTECTED]> writes: > > gcc -I. -c main.c test1.c test2.c > > gcc -shared -o libtest1.so test1.o > > gcc -shared -o libtest2.so test2.o > > gcc -o test -L. -ltest1 main.o > &g

Re: Problem with linking ununsed symbols in a shared library

2005-04-05 Thread Shridhar Daithankar
On Tuesday 05 Apr 2005 7:09 pm, Ian Lance Taylor wrote: > Shridhar Daithankar <[EMAIL PROTECTED]> writes: > > The main.c does not have any reference to func4. main.c uses just func1 > > which is available in libtest1.so and does not use any function in > > libtest2.so. S