7 typedef struct _IMAGE_SECTION_HEADER PeSect
;
11 u16int (*e2
)(const unsigned char *data
);
12 u32int (*e4
)(const unsigned char *data
);
13 u64int (*e8
)(const unsigned char *data
);
14 ulong imagebase
, imagesize
, loadbase
;
15 ulong codestart
, datastart
;
16 int (*loadsection
)(struct _Pe
*pe
, char *name
, struct DwarfBlock
*b
);
18 struct _IMAGE_SECTION_HEADER
*sect
;
21 Pe
*peopen(const char *name
);
22 int loaddisksection(struct _Pe
*pe
, char *name
, struct DwarfBlock
*b
);
23 u16int
peget2(const unsigned char *ptr
);
24 u32int
peget4(const unsigned char *ptr
);
25 u64int
peget8(const unsigned char *ptr
);
26 void pefree(struct _Pe
*pe
);
27 ulong
pefindrva(struct _IMAGE_SECTION_HEADER
*SectionHeader
, int NumberOfSections
, ulong TargetPhysical
);
28 int GetStrnlen(const char *string
, int maxlen
);
30 #define ANSI_NAME_STRING(s) ((PANSI_STRING)((s)->Name))
32 #endif/*_LIBMACH_PE_H_*/