Commit | Line | Data |
---|---|---|
acb46fd4 RS |
1 | /* Trivial unexec for Solaris. */ |
2 | ||
3 | #include <config.h> | |
4 | #include <stdlib.h> | |
5 | #include <dlfcn.h> | |
6 | ||
7 | #include "lisp.h" | |
dad0e4f4 MR |
8 | #include "buffer.h" |
9 | #include "charset.h" | |
10 | #include "coding.h" | |
acb46fd4 RS |
11 | |
12 | int | |
13 | unexec (char *new_name, char *old_name, unsigned int data_start, | |
14 | unsigned int bss_start, unsigned int entry_address) | |
15 | { | |
fdebad64 RS |
16 | Lisp_Object data; |
17 | Lisp_Object errstring; | |
acb46fd4 | 18 | |
fdebad64 RS |
19 | if (! dldump (0, new_name, RTLD_MEMORY)) |
20 | return 0; | |
21 | ||
22 | data = Fcons (build_string (new_name), Qnil); | |
23 | synchronize_system_messages_locale (); | |
24 | errstring = code_convert_string_norecord (build_string (dlerror ()), | |
25 | Vlocale_coding_system, 0); | |
26 | ||
fdebad64 RS |
27 | Fsignal (Qfile_error, |
28 | Fcons (build_string ("Cannot unexec"), Fcons (errstring, data))); | |
acb46fd4 | 29 | } |
ab5796a9 MB |
30 | |
31 | /* arch-tag: d8ff72b3-8198-4011-8ef5-011b12027f59 | |
32 | (do not change this comment) */ |