Olivier Galibert <galibert(a)pobox.com> writes:
Stupid SGI trick of the day:
lrwxr-xr-x 1 root sys 12 Sep 24 1997 /usr/lib32/libz.so ->
libiflPNG.so
This means that linking with -lz, which is done by default, pulls
in
some ifl libraries. These libraries (Image Format Library) is a set of
C++ classes with C wrappers which uses constructors calls for static
objects on startup to auto-initialize the list of supported formats.
Uh oh. Fun city.
We use dumping, which means that the initialisation is done twice
for
the dumped executable. Immediate and inavoidable segfault.
Ideas ?
Depending on where the crashes are occurring you might be able to use the
same fix I made for Linux/glibc and EGCS. Hopefully you are crashing
after the call to exit ...
I forced a non-standard link to use "C"-only startup files (eliminated
some of the constructor stuff) *and* turned off free'ing at exit time
(eliminating all destructor stuff) by using a blackhole __free_hook.
If you are using the old GNU malloc included with XEmacs or the system
malloc supports (the equivalent of) __free_hook, you should be able to
do the same thing. See the code that references `voodoo_free_hook' in
src/emacs.c.