Re: C Linker/Compiler question

Greg Jaxon <>
30 Apr 2000 00:20:10 -0400

          From comp.compilers

Related articles
C Linker/Compiler question (Francis Girard) (2000-04-20)
Re: C Linker/Compiler question (2000-04-25)
Re: C Linker/Compiler question (Arthur H. Gold) (2000-04-25)
Re: C Linker/Compiler question (Francis Girard) (2000-04-26)
Re: C Linker/Compiler question (Arthur H. Gold) (2000-04-30)
Re: C Linker/Compiler question (Greg Jaxon) (2000-04-30)
Re: C Linker/Compiler question (Eric Eide) (2000-05-04)
Re: C Linker/Compiler question (Bengt Farre) (2000-05-12)
| List of all articles for this month |

From: Greg Jaxon <>
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,'s reference to a() is bound to the definition provided by, even if 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

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.