Does GNU emacs ever use shared libraries?

David Robinson david at elroy.Jpl.Nasa.Gov
Sat May 13 06:24:29 AEST 1989


In article <152 at talarian.UUCP>, scott at talarian.UUCP (Scott Weitzenkamp) writes:
> 
>   I noticed that on SunOS 4.0, GNU emacs uses the -Bstatic flag to cc
> to prevent the use of shared libraries.  Does GNU emacs ever use 
> shared libraries?  If not, why not?  Does System V have an option
> like -Bstatic to prevent the use of shared libraries?

I have implemented a version of GNU emacs that uses shared libraries.
The reason it didn't before was that emacs calls unexec() to save the
data segment and bss segment, in these segments are information about
where libraries are mmap'd in if you compile it with shared libraries.
This information is not always the same and will definately differ on
different machines.  There are other problems as well.

My version that uses shared libraries does so by writing out the data and
bss segments to a file and mmap'ing it in upon execution.  This file
is mmap'd in as a copy-on-write segment so that only the pages that are
changed will be copied and the rest shared.  This should reduce the amount
of physical memory needed when more than one copy is running and help
out Suns with limited memory.

I will be sending the patches to implement this to GNU as soon as I get
them upgraded to the latest version of emacs.


-- 
	David Robinson		elroy!david at csvax.caltech.edu     ARPA
				david at elroy.jpl.nasa.gov	  ARPA
				{cit-vax,ames}!elroy!david	  UUCP
Disclaimer: No one listens to me anyway!



More information about the Comp.unix.questions mailing list