|
From: Hanzac C. <ha...@gm...> - 2005-02-24 00:06:02
|
Hi, guys
Since the two kinds of COFF formats have quite different absolute symbol
relocation ways, is there any method that can be used to check the two
formats. (Not the final executable images.)
Once I used f_flags to decide, seeing if there is the F_AR32WR flag?
But later, I found this flag can't be used 'cause in two versions of
MingW GCC (3.3.1 and 3.4.2), they treated differently, one set it on
and the other set it off. It's quite strange.
struct external_filehdr {
WORD f_magic; /* magic number */
WORD f_nscns; /* number of sections */
DWORD f_timdat; /* time & date stamp */
DWORD f_symptr; /* file pointer to symtab */
DWORD f_nsyms; /* number of symtab entries */
WORD f_opthdr; /* sizeof(optional hdr) */
WORD f_flags; /* flags */
};
#define F_AR32WR (0x0100)
Thanks,
Hanzac
|