Mercurial > emacs
comparison src/unexmacosx.c @ 110729:99084f50aa8e
Remove unused arguments for unexec.
The third one is never used, and the last two are always passed as zero.
* src/emacs.c (unexec): Add declaration.
(Fdump_emacs): Only pass the first two arguments to unexec.
Simplify #ifdef.
* src/unexw32.c (unexec):
* src/unexsol.c (unexec):
* src/unexhp9k800.c (unexec):
* src/unexcw.c (unexec): Remove the last 3 arguments, unused.
* src/unexelf.c (unexec): Remove the last 3 arguments, unused.
(find_section): Use const.
* src/unexmacosx.c (unexec): Remove the last 3 arguments, unused.
(unexec_error): Declare it NO_RETURN.
* src/unexcoff.c (make_hdr): Assume bss_start is always zero, remove
it as an argument, remove data_start and entry_address arguments, unused.
(unexec): Remove bss_start, data_start and
entry_address arguments.
* src/unexaix.c (make_hdr): Assume bss_start is always zero, remove
it as an argument, remove data_start and entry_address arguments, unused.
(unexec): Remove bss_start, data_start and
entry_address arguments.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sun, 03 Oct 2010 06:59:56 -0700 |
parents | b9025d71747a |
children | 417b1e4d63cd |
comparison
equal
deleted
inserted
replaced
110728:ab7396ada96a | 110729:99084f50aa8e |
---|---|
187 | 187 |
188 /* file offset of input file's data segment */ | 188 /* file offset of input file's data segment */ |
189 static off_t data_segment_old_fileoff = 0; | 189 static off_t data_segment_old_fileoff = 0; |
190 | 190 |
191 static struct segment_command *data_segment_scp; | 191 static struct segment_command *data_segment_scp; |
192 | |
193 static void unexec_error (const char *format, ...) NO_RETURN; | |
192 | 194 |
193 /* Read N bytes from infd into memory starting at address DEST. | 195 /* Read N bytes from infd into memory starting at address DEST. |
194 Return true if successful, false otherwise. */ | 196 Return true if successful, false otherwise. */ |
195 static int | 197 static int |
196 unexec_read (void *dest, size_t n) | 198 unexec_read (void *dest, size_t n) |
1215 | 1217 |
1216 /* Take a snapshot of Emacs and make a Mach-O format executable file | 1218 /* Take a snapshot of Emacs and make a Mach-O format executable file |
1217 from it. The file names of the output and input files are outfile | 1219 from it. The file names of the output and input files are outfile |
1218 and infile, respectively. The three other parameters are | 1220 and infile, respectively. The three other parameters are |
1219 ignored. */ | 1221 ignored. */ |
1220 void | 1222 int |
1221 unexec (char *outfile, char *infile, void *start_data, void *start_bss, | 1223 unexec (const char *outfile, const char *infile) |
1222 void *entry_address) | |
1223 { | 1224 { |
1224 if (in_dumped_exec) | 1225 if (in_dumped_exec) |
1225 unexec_error ("Unexec from a dumped executable is not supported."); | 1226 unexec_error ("Unexec from a dumped executable is not supported."); |
1226 | 1227 |
1227 pagesize = getpagesize (); | 1228 pagesize = getpagesize (); |
1247 in_dumped_exec = 1; | 1248 in_dumped_exec = 1; |
1248 | 1249 |
1249 dump_it (); | 1250 dump_it (); |
1250 | 1251 |
1251 close (outfd); | 1252 close (outfd); |
1253 return 0; | |
1252 } | 1254 } |
1253 | 1255 |
1254 | 1256 |
1255 void | 1257 void |
1256 unexec_init_emacs_zone (void) | 1258 unexec_init_emacs_zone (void) |