This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: shared libg2c?
- To: Michael Matz <matzmich at cs dot tu-berlin dot de>
- Subject: Re: shared libg2c?
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Wed, 01 Nov 2000 22:00:33 +0100
- CC: nbecker at fred dot net, gcc at gcc dot gnu dot org
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <Pine.GSO.4.21.0011011433360.28519-100000@platon>
Michael Matz wrote:
> On Tue, 31 Oct 2000, I wrote:
> > Because it is not useful to have a non-reentrant shared lib, period :-)
> Huh? Shared lib only means, that pages from the (immutable) .text section
> and probably the .rodata section are shared between processes. As only
> immutable pages can be shared, there are by definition no reentrancy
> issues. And even if a page ever gets modified it becomes unshared.
Yep - a clear example that I know too much ;-)
I also wrote:
>[ Note: The above analysis is based on my experience building and
> maintaining the equivalent(s) of shared libraries on Sperry Univac's
> EXEC 37.x, called (Configured) Common Banks, about 17-18 years ago.
> Don't take this as gospel ... ]
Unfortunately, a Common Bank on Univac's EXEC is a *lot* like a shared
library, but not exactly equal to one. The discerning difference is
that a static, writable, data area (i.e. a static variable/array or a
Fortran COMMON block) _inside_ the Common Bank is a shared resource,
unlike such a construct in a shared library on a more recent OS.
For comparison, if you needed a process-private piece of memory in a
Common Bank routine, you had to specify the API such that the calling
routine passed a pointer to a data area in the caller.
Yeah - those were the days !
I sincerely apologise for spreading disinformation about shared
libraries in general and about the possibility to link libg2c as one in
particular.
Cheers,
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)