Re: Help- selective symbol exposure after link

Dave Lloyd <Dave@occl-cam.demon.co.uk>
7 Feb 1997 23:41:45 -0500

          From comp.compilers

Related articles
[6 earlier articles]
Re: Help- selective symbol exposure after link maslen@best.com (Thomas M. Maslen) (1997-01-29)
Re: Help- selective symbol exposure after link aeb@saltfarm.bt.co.uk (1997-01-29)
Re: Help- selective symbol exposure after link albaugh@agames.com (1997-01-30)
Re: Help- selective symbol exposure after link leichter@smarts.com (Jerry Leichter) (1997-01-30)
Re: Help- selective symbol exposure after link root@jacob.remcomp.fr (1997-02-02)
Re: Help- selective symbol exposure after link Dave@occl-cam.demon.co.uk (Dave Lloyd) (1997-02-07)
Re: Help- selective symbol exposure after link Dave@occl-cam.demon.co.uk (Dave Lloyd) (1997-02-07)
Re: Help- selective symbol exposure after link fjh@murlibobo.cs.mu.OZ.AU (1997-02-08)
Re: Help- selective symbol exposure after link ok@cs.rmit.edu.au (1997-02-11)
Re: Help- selective symbol exposure after link pfox@lehman.com (Paul David Fox) (1997-02-11)
Re: Help- selective symbol exposure after link jan@fsnif.neuroinformatik.ruhr-uni-bochum.de (Jan Vorbrueggen) (1997-02-16)
Re: Help- selective symbol exposure after link Dave@occl-cam.demon.co.uk (Dave Lloyd) (1997-02-20)
Re: Help- selective symbol exposure after link rfg@monkeys.com (1997-02-27)
| List of all articles for this month |
From: Dave Lloyd <Dave@occl-cam.demon.co.uk>
Newsgroups: comp.compilers
Date: 7 Feb 1997 23:41:45 -0500
Organization: Compilers Central
References: 97-01-183 97-01-189 97-01-212
Keywords: linker, design

"Thomas M. Maslen" <maslen@best.com> asked
> > [I have long maintained that nested link-time scopes are a good
> > idea, but I've never seen a linker that actually provides them. -John]
>
> ... and perhaps he could expand (or expound) on that? Offhand, I'd
> file it under "nice, but overkill".


John replied:
! [It means what it sounds like, groups of modules which share symbols
! but export limited numbers of symbols to the outside. For small
! programs, it's overkill, but for large programs with lots of libraries
! and subsystems, it'd be nice not to have to prefix every symbol shared
! among routines in the foo subsystem with "foo_". Re Solaris, I looked
! at the ld man page on a nearby 4.1.4 system and it looked like the
! same old dumb linker, just barely smart enough to create and
! defererence shared libraries. Is there something else I should look
! at? -John]


The real problem is that C doesn't need it and has no ability to
express this layer of scope. With languages like Algol 68, Fortran 90,
Ada, etc., etc., with real modules, nested scopes are very
desirable. We end up mapping all our symbols to <module>$<id> to
squeeze through these crappy linkers. Name mangling in C++ is another
example of the limitations in most linkers (what is wanted is a
strong-typed linker). Many compilation systems for these bigger
languages end up using an intermediate linker or compositor to do the
semantic side of the job and then throw some objects to the system
linker for binding with the system API or stuff from other languages.
But while C/Unix rules the roost I can see little chance for change.


Regards,
----------------------------------------------------------------------
Dave Lloyd mailto:Dave@occl-cam.demon.co.uk
Oxford and Cambridge Compilers Ltd http://www.occl-cam.demon.co.uk/
Cambridge, England http://www.chaos.org.uk/~dave/
--


Post a followup to this message

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