This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: shared libg2c?


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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]