Related articles |
---|
C Linker/Compiler question frgirard@globetrotter.net (Francis Girard) (2000-04-20) |
Re: C Linker/Compiler question jhallen@world.std.com (2000-04-25) |
Re: C Linker/Compiler question agold@bga.com (Arthur H. Gold) (2000-04-25) |
Re: C Linker/Compiler question frgirard@globetrotter.net (Francis Girard) (2000-04-26) |
Re: C Linker/Compiler question agold@bga.com (Arthur H. Gold) (2000-04-30) |
Re: C Linker/Compiler question jaxon@soltec.net (Greg Jaxon) (2000-04-30) |
Re: C Linker/Compiler question eeide@cs.utah.edu (Eric Eide) (2000-05-04) |
Re: C Linker/Compiler question cosmic@cosmic-software.se (Bengt Farre) (2000-05-12) |
From: | Greg Jaxon <jaxon@soltec.net> |
Newsgroups: | comp.compilers |
Date: | 30 Apr 2000 00:20:10 -0400 |
Organization: | Learners Unlimited |
References: | 00-04-150 00-04-174 00-04-187 |
Keywords: | linker |
Francis Girard wrote:
>
> The problem is that NO link related job is done when libraries are
> constructed. Therefore when all this code is really linked in app,
> only the first definition of a() is used. What I would like to do is
> to construct my_lib2 so that the call to a() is resolved right away to
> the address in real_lib. Is it reasonable ? Is "partial linking" the
> solution ? Is it safe to use ld when the objects files had been
> constructed with another tool, say KCC or anything other ?
Linkers for shared libraries often have such a feature, and it has
been called "Symbolic" linking or "Immediate" binding. In fact, this
was the first form of shared library linking, but is generally not
preferred, and not used by default. In this form of linking,
lib1.so's reference to a() is bound to the definition provided by
lib2.so, even if lib1.so is loaded into an application which already
has a definition for a(). Getting this form of linking to happen just
for those symbols you want to bind this way will probably be a very
fragile platform-specific piece of application building. My gut
feeling is that there is something wrong with your problem
decomposition if you are forced to use this kind of technique.
Greg Jaxon
KAI Optimizing Compilers
Return to the
comp.compilers page.
Search the
comp.compilers archives again.