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. So libtest2.so should not be required at all. > > The linker doesn't know that func1 does not need func4. The linker > only sees the defined reference in test1.so to func4. > > You can control this behaviour using the --unresolved-symbols option. > See the documentation. > > > On HP-UX, the build is organized such that each directory produces an > > archive library. Some of the directories produce binaries and I have the > > link command line that is known to work on HP-UX. > > > > However specifying same dependent libraries produce aforementioned errors > > on linux. The linux build is using shared libraries. If the linker could > > figure the minimum required dependencies, it will be a great help to me > > here. > > If the build worked using archive libraries on HP-UX, why not use > archive libraries on Linux? Shared libraries are similar, but > different. > > The easy way to use shared libraries in a similar fashion would be to > use --as-needed and link against every shared library. Or to link all > the objects together into a single shared library.
All the options you have suggested are correct but not feasible due to some non-technical reasons. However I will try to find a middle ground where I can adopt an intermediate approach. Thanks for the suggestions. Regards, Shridhar _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils