/* unexec for GNU Emacs on Windows NT.
- Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
-GNU Emacs is free software; you can redistribute it and/or modify
+GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU Emacs; see the file COPYING. If not, write to
-the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.
+along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
+/*
Geoff Voelker (voelker@cs.washington.edu) 8-12-94
*/
#include <config.h>
+#include "unexec.h"
#include <stdio.h>
#include <fcntl.h>
is finished. */
#ifdef HAVE_NTGUI
/* determine WinMain args like crt0.c does */
- hinst = GetModuleHandle(NULL);
- lpCmdLine = GetCommandLine();
+ hinst = GetModuleHandle (NULL);
+ lpCmdLine = GetCommandLine ();
nCmdShow = SW_SHOWDEFAULT;
#endif
mainCRTStartup ();
#define PTR_TO_RVA(ptr) ((DWORD)(ptr) - (DWORD) GetModuleHandle (NULL))
#define RVA_TO_PTR(var,section,filedata) \
- ((void *)(RVA_TO_OFFSET(var,section) + (filedata).file_base))
+ ((void *)(RVA_TO_OFFSET (var,section) + (filedata).file_base))
#define PTR_TO_OFFSET(ptr, pfile_data) \
((unsigned char *)(ptr) - (pfile_data)->file_base)
{
PIMAGE_DOS_HEADER dos_header;
PIMAGE_NT_HEADERS nt_header;
- PIMAGE_SECTION_HEADER section;
int overlap;
dos_header = (PIMAGE_DOS_HEADER) p_infile->file_base;
/* Dump out .data and .bss sections into a new executable. */
void
-unexec (char *new_name, char *old_name, void *start_data, void *start_bss,
- void *entry_address)
+unexec (const char *new_name, const char *old_name)
{
file_data in_file, out_file;
char out_filename[MAX_PATH], in_filename[MAX_PATH];
}
/* eof */
-
-/* arch-tag: fe1d3d1c-ef88-4917-ab22-f12ab16b3254
- (do not change this comment) */