1
- /*
2
- gendef - Generate list of exported symbols from a Portable Executable.
3
- Copyright (C) 2009, 2010, 2011, 2012, 2013 mingw-w64 project
4
-
5
- This program is free software: you can redistribute it and/or modify
6
- it under the terms of the GNU General Public License as published by
7
- the Free Software Foundation, either version 3 of the License, or
8
- (at your option) any later version.
9
-
10
- This program is distributed in the hope that it will be useful,
11
- but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- GNU General Public License for more details.
14
-
15
- You should have received a copy of the GNU General Public License
16
- along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- */
18
-
19
1
/* Assumption: ispe is 32bit and OS is at minimum XP (no OS2 and POSIX emulation)
20
2
* This app return error if file not a PE,
21
3
* or if PE but not "executable" with respect to Windows bitness
@@ -37,6 +19,23 @@ BOOL WINAPI IsWow64Process(LPCTSTR, PBOOL);
37
19
38
20
39
21
// copied from mingw-w64 gendef
22
+ /*
23
+ Copyright (C) 2009, 2010, 2011, 2012, 2013 mingw-w64 project
24
+
25
+ This program is free software: you can redistribute it and/or modify
26
+ it under the terms of the GNU General Public License as published by
27
+ the Free Software Foundation, either version 3 of the License, or
28
+ (at your option) any later version.
29
+
30
+ This program is distributed in the hope that it will be useful,
31
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
32
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33
+ GNU General Public License for more details.
34
+
35
+ You should have received a copy of the GNU General Public License
36
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
37
+ */
38
+
40
39
static PVOID revert ; /*revert pointer*/
41
40
static HMODULE kernel32handle ;
42
41
typedef WINBOOL (__stdcall (* redirector ))(PVOID * );
@@ -65,7 +64,7 @@ void doredirect(const int redir) {
65
64
atexit (undoredirect );
66
65
}
67
66
}
68
-
67
+ // end of gendef chunk
69
68
70
69
71
70
typedef struct _PETYPE {
@@ -116,6 +115,5 @@ int main (int argc,char *argv[]) {
116
115
}
117
116
}
118
117
undoredirect ();
119
- printf ("Not Executable\n" );
120
118
return 1 ;
121
119
}
0 commit comments