7 typedef struct _IMAGE_SECTION_HEADER PeSect
;
9 typedef struct _CoffSymbol
{
16 u16int (*e2
)(const unsigned char *data
);
17 u32int (*e4
)(const unsigned char *data
);
18 u64int (*e8
)(const unsigned char *data
);
19 ulong imagebase
, imagesize
, loadbase
;
22 int (*loadsection
)(struct _Pe
*pe
, char *name
, struct DwarfBlock
*b
);
24 struct _IMAGE_SECTION_HEADER
*sect
;
31 char e_name
[E_SYMNMLEN
];
33 unsigned long e_zeroes
;
34 unsigned long e_offset
;
37 unsigned long e_value
;
39 unsigned short e_type
;
40 unsigned char e_sclass
;
41 unsigned char e_numaux
;
49 Pe
*peopen(const char *name
);
50 int loaddisksection(struct _Pe
*pe
, char *name
, struct DwarfBlock
*b
);
51 int loadmemsection(struct _Pe
*pe
, char *name
, struct DwarfBlock
*b
);
52 u16int
peget2(const unsigned char *ptr
);
53 u32int
peget4(const unsigned char *ptr
);
54 u64int
peget8(const unsigned char *ptr
);
55 void pefree(struct _Pe
*pe
);
56 ulong
pefindrva(struct _IMAGE_SECTION_HEADER
*SectionHeader
, int NumberOfSections
, ulong TargetPhysical
);
57 int GetStrnlen(const char *string
, int maxlen
);
59 #define ANSI_NAME_STRING(s) ((PANSI_STRING)((s)->Name))
61 #endif/*_LIBMACH_PE_H_*/