ReactOS  0.4.12-dev-396-g37af787
genincdata.c
Go to the documentation of this file.
1 #undef __MSVCRT__
2 #include <psdk/ntverp.h>
3 
4 /* DDK/IFS/NDK Headers */
5 #define _NTSYSTEM_
6 #include <excpt.h>
7 #include <setjmp.h>
8 #include <ntdef.h>
9 #include <ntifs.h>
10 #include <arc/arc.h>
11 #include <ntndk.h>
12 #include <bugcodes.h>
13 
14 /* KD Support */
15 #define NOEXTAPI
16 #include <windbgkd.h>
17 #include <wdbgexts.h>
18 #include <kddll.h>
19 
20 #ifdef _M_AMD64
21 enum
22 {
23  P1Home = 1 * sizeof(PVOID),
24  P2Home = 2 * sizeof(PVOID),
25  P3Home = 3 * sizeof(PVOID),
26  P4Home = 4 * sizeof(PVOID),
27 };
28 #endif
29 
30 typedef struct
31 {
32  char Type;
33  char Name[55];
35 } ASMGENDATA;
36 
37 #define TYPE_END 0
38 #define TYPE_RAW 1
39 #define TYPE_CONSTANT 2
40 #define TYPE_HEADER 3
41 
42 #define RAW(x) {TYPE_RAW, x, 0}
43 #define CONSTANT(name) {TYPE_CONSTANT, #name, (ULONG)name}
44 #define CONSTANT64(name) {TYPE_CONSTANT, #name, (ULONGLONG)name}
45 #define CONSTANTPTR(name) {TYPE_CONSTANT, #name, (ULONG_PTR)name}
46 #define CONSTANTX(name, value) {TYPE_CONSTANT, #name, value}
47 #define OFFSET(name, struct, member) {TYPE_CONSTANT, #name, FIELD_OFFSET(struct, member)}
48 #define RELOFFSET(name, struct, member, to) {TYPE_CONSTANT, #name, FIELD_OFFSET(struct, member) - FIELD_OFFSET(struct, to)}
49 #define SIZE(name, struct) {TYPE_CONSTANT, #name, sizeof(struct)}
50 #define HEADER(x) {TYPE_HEADER, x, 0}
51 
52 #if defined(_MSC_VER)
53 #pragma section(".asmdef")
54 __declspec(allocate(".asmdef"))
55 #elif defined(__GNUC__)
56 __attribute__ ((section(".asmdef")))
57 #else
58 #error Your compiler is not supported.
59 #endif
60 
62 {
63 /* ARCHITECTURE SPECIFIC CONTSTANTS ******************************************/
64 #ifdef _M_IX86
65 #include "ks386.template.h"
66 #elif defined(_M_AMD64)
67 #include "ksamd64.template.h"
68 #elif defined(_M_ARM)
69 #include "ksarm.template.h"
70 #endif
71 
72 /* PORTABLE CONSTANTS ********************************************************/
73 #include "ksx.template.h"
74 
75  /* End of list */
76  {TYPE_END, "", 0}
77 };
78 
ULONGLONG Value
Definition: genincdata.c:34
ASMGENDATA Table[]
Definition: genincdata.c:61
char Type
Definition: genincdata.c:32
struct _EXCEPTION_POINTERS *_CRTIMP __declspec(noreturn) void __cdecl terminate(void)
Definition: eh.h:27
#define __attribute__(Spec)
Definition: hlsl.tab.c:1213
static IMAGE_SECTION_HEADER section
Definition: loader.c:152
void * PVOID
Definition: retypes.h:9
uint64_t ULONGLONG
Definition: typedefs.h:65
#define TYPE_END
Definition: genincdata.c:37