Xref: utzoo comp.emacs:6057 comp.unix.questions:13563 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!xanth!nic.MR.NET!thor.acc.stolaf.edu!mike From: mike@thor.acc.stolaf.edu (Mike Haertel) Newsgroups: comp.emacs,comp.unix.questions Subject: Re: Does GNU emacs ever use shared libraries? Keywords: GNU shared blah blah blah Message-ID: <2102@thor.acc.stolaf.edu> Date: 13 May 89 15:34:01 GMT References: <152@talarian.UUCP> Reply-To: mike@stolaf.edu Followup-To: comp.emacs Distribution: usa Organization: St. Olaf College, Northfield, MN Lines: 24 In article <152@talarian.UUCP> scott@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? It is very hard to make a program that has the capability of `undumping' itself (i.e., creating a new executable file which when started will restore the current state of the program) work with most shared library implementations. The problem is that the shared library generally has its own separate `data segment' which is obtained from the library on program startup, not from the executable file. The library's data segment generally contains interesting things such as the state of the I/O library and the memory allocator, stuff that you need to preserve if you're going to undump. It's certainly possible to do such an undump, and I can also visualize various shared library implementations that would make it straightforward, but they would probably less efficient in the general case. On, say, a Sunos 4 machine, the library code probably comprises less than 40K of the emacs executable anyway. It just isn't worth the effort. -- Mike Haertel main() ??< printf("hello, world??/n"); ??>