Re: C Linker/Compiler question

Eric Eide <>
4 May 2000 17:13:46 -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)
Re: ANN: Release of "Knit" component composition toolset (Eric Eide) (2001-02-23)
| List of all articles for this month |

From: Eric Eide <>
Newsgroups: comp.compilers
Date: 4 May 2000 17:13:46 -0400
Organization: University of Utah Department of Computer Science
References: 00-04-150
Keywords: C, linker, comment

Francis Girard <> writes:

> Is there a way to generate a library (with gcc, kcc or anything) that
> includes another library AND DOES some linking tasks by filling the
> wholes in the intermediate files (.o) we're including in the library
> we're trying to build with the code found in the library we're also
> including in that library we're trying to build.
> The goal is to not use another version of the same symbols when
> linking to an executable.

I don't have a solution to give you today, but I thought that readers
of this newsgroup might be interested in some related current research
that we're doing here in the Flux Group at the University of Utah.

In particular, we are developing a ``component'' model for C code that
can be applied to the situation you describe above. (When I say
component, think ``modules'' or ``libraries'' or ``object files.'')

In our model, called ``C plus Units,'' the programmer can specify
explicit linkage between components. It is straightforward to create
a new component by encapsulating an existing component; the outer
module can be implemented to satisfy some of imports of the inner
module, thus ``hiding'' those inner linkages. (This is the example
you describe.) In C plus Units, it is also straightforward to
implement other linking ``tricks.'' For example, if two modules each
provide `printf', the programmer decides which is used in the linked
system. In fact, both versions of `printf' may be used: they may be
used by different modules, or they may even be used by a single
module, because our linking language allows for renaming.

Our research is preliminary. A technical report describing C plus
Units and some initial applications of the system will be available
soon; when it is published, I will send an announcement to this
newsgroup. (It will also be linked from the Flux Project Web pages at
<>.) The C plus Units compiler is several
months away from being really usable; our goal is to have an initial
public release sometime ~4Q2000.

Eric Eide <> . University of Utah Dept. of Computer Science . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX
[I've never understood why nobody does link-level name scoping beyond a
simple local/global distinction. Particularly with shared libraries there's
chronic problems with name collisions between symbols intended to be local
to a one library or another. -John]

Post a followup to this message

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