(unexec): Error if trying unexec from dumped executable.
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Mon, 1 May 2006 01:13:42 +0000 (01:13 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Mon, 1 May 2006 01:13:42 +0000 (01:13 +0000)
src/unexmacosx.c

index 4ca0be8..f65fd9c 100644 (file)
@@ -1021,6 +1021,9 @@ void
 unexec (char *outfile, char *infile, void *start_data, void *start_bss,
         void *entry_address)
 {
+  if (in_dumped_exec)
+    unexec_error ("Unexec from a dumped executable is not supported.");
+
   infd = open (infile, O_RDONLY, 0);
   if (infd < 0)
     {