Commit | Line | Data |
---|---|---|
acb46fd4 RS |
1 | /* Trivial unexec for Solaris. */ |
2 | ||
3 | #include <config.h> | |
ce701a33 PE |
4 | #include "unexec.h" |
5 | ||
acb46fd4 | 6 | #include <dlfcn.h> |
d7306fe6 | 7 | #include <setjmp.h> |
acb46fd4 RS |
8 | |
9 | #include "lisp.h" | |
e5560ff7 | 10 | #include "character.h" |
dad0e4f4 MR |
11 | #include "buffer.h" |
12 | #include "charset.h" | |
13 | #include "coding.h" | |
acb46fd4 | 14 | |
381259ef | 15 | void |
dd5ecd6b | 16 | unexec (const char *new_name, const char *old_name) |
acb46fd4 | 17 | { |
fdebad64 RS |
18 | Lisp_Object data; |
19 | Lisp_Object errstring; | |
acb46fd4 | 20 | |
fdebad64 | 21 | if (! dldump (0, new_name, RTLD_MEMORY)) |
381259ef | 22 | return; |
fdebad64 RS |
23 | |
24 | data = Fcons (build_string (new_name), Qnil); | |
25 | synchronize_system_messages_locale (); | |
26 | errstring = code_convert_string_norecord (build_string (dlerror ()), | |
27 | Vlocale_coding_system, 0); | |
28 | ||
dbfcf224 | 29 | xsignal (Qfile_error, |
fdebad64 | 30 | Fcons (build_string ("Cannot unexec"), Fcons (errstring, data))); |
acb46fd4 | 31 | } |