Does GNU emacs ever use shared libraries?
Mike Haertel
mike at thor.acc.stolaf.edu
Sun May 14 01:34:01 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?
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 <mike at stolaf.edu>
main() ??< printf("hello, world??/n"); ??>
More information about the Comp.unix.questions
mailing list