Ref. https://support.microsoft.com/en-us/kb/121460
The COFF file format has the following prologue that with some
teaking might serve as a file(1) 'magic':
Offset Size Field Description
------ ---- ------------------- -----------------------------------------------
0 2 Machine Number identifying type of target machine.
2 2 Number of Sections Number of sections; indicates size of the
Section Table, which immediately follows
the headers.
4 4 Time/Date Stamp Time and date the file was created.
8 4 Pointer to Symbol Offset, within the COFF file, of the symbol
Table table.
12 4 Number of Symbols Number of entries in the symbol table.
This data can be used in locating the
string table, which immediately follows
the symbol table.
16 2 Optional Header Size of the optional header, which is
Size included for executable files but not
object files. An object file should have a
value of 0 here.
18 2 Characteristics Flags indicating attributes of the file.
Now peruse and study /usr/share/file/magic (you need the sources for this)
for 10 seconds, spit on your hands and get to typing, and both leave COFF
in place & working AND enable a correct git blob identification.
Be quick or else I'll do it myself.
Bauke Jan Douma
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]