]> code.delx.au - gnu-emacs/blob - src/unexsol.c
* alloc.c: Do not define struct catchtag.
[gnu-emacs] / src / unexsol.c
1 /* Trivial unexec for Solaris. */
2
3 #include <config.h>
4 #include <stdlib.h>
5 #include <dlfcn.h>
6 #include <setjmp.h>
7
8 #include "lisp.h"
9 #include "buffer.h"
10 #include "charset.h"
11 #include "coding.h"
12
13 int
14 unexec (char *new_name, char *old_name, unsigned int data_start,
15 unsigned int bss_start, unsigned int entry_address)
16 {
17 Lisp_Object data;
18 Lisp_Object errstring;
19
20 if (! dldump (0, new_name, RTLD_MEMORY))
21 return 0;
22
23 data = Fcons (build_string (new_name), Qnil);
24 synchronize_system_messages_locale ();
25 errstring = code_convert_string_norecord (build_string (dlerror ()),
26 Vlocale_coding_system, 0);
27
28 xsignal (Qfile_error,
29 Fcons (build_string ("Cannot unexec"), Fcons (errstring, data)));
30 }
31
32 /* arch-tag: d8ff72b3-8198-4011-8ef5-011b12027f59
33 (do not change this comment) */