Re: [LIP] Restricting LD to strictly required symbols only

Shridhar Daithankar <[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
On Saturday 02 Apr 2005 10:31 pm, [email protected] wrote:
> Shridhar Daithankar posted in linux-india-programmers:
> > GNU ld asks for libB following the dependency chain like,
> > program->libA->libB. Trouble is I know that program does not use libB at
> > all but some functions in libA do depend upon it.
>
> If you are pretty sure that the functions you call in libA do not depend on
> libB, then I guess you could hack the sources of libA to get rid of its
> dependency on libB.

Hmm.. that is easier said than done..:-( And I am precisely trying to avoid 
it..I would love to re-organize the sources but that has far higher impact 
since per module regression test need to be redone too..

Thing is, when the project built on HP-UX, it uses one archive library per 
module. On linux I have converted it to one shared library per module. 

Ideally the same set of libraries i.e. -lfoo1 -lfoo2 etc.,  should suffice for 
linking in both the scenarios.

But it is not..Looks like it is a hard way to go..

> > The chain is getting rather long and I am really short of listing all 60+
> > libraries on ld commandline.
>
> You might want to look at the GNU toolchain of autoconf/automake etc. that
> would make all this simpler.

I am using jam from perforce which I found to be better than automake. I don't 
think I need autoconf because the platforms are *very* tightly controlled.

Just a personal experience.

 Shridhar


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.