Pat Tullmann 0cb742dafb binfmt-detector-cli: rewrite to support PE32+ binaries (#38)
Rewrite with hard-coded offsets into the PE file format to discern
if a binary is PE32 or PE32+, and then to determine if it contains
a "CLR Data Directory" entry that looks valid.

Tested with PE32 and PE32+ compiled Mono binaries, PE32 and PE32+ native
binaries, and a random assortment of garbage files.

Former-commit-id: 9e7ac86ec84f653a2f79b87183efd5b0ebda001b
2023-10-16 20:16:47 +02:00
..
2019-07-26 19:53:28 +00:00
2014-08-13 10:39:27 +01:00
2014-08-13 10:39:27 +01:00
2014-08-13 10:39:27 +01:00
2018-04-24 09:31:23 +00:00
2014-08-13 10:39:27 +01:00
2019-02-04 20:11:37 +00:00
2014-08-13 10:39:27 +01:00

* GB18030 support

	GB18030Encoding requires an assembly resource named "gb18030.table".
	This resource can be generated from "GB18030Source.exe" with an
	external resource "gb18030-2000.xml":

	http://dev.icu-project.org/cgi-bin/viewcvs.cgi/*checkout*/charset/data/xml/gb-18030-2000.xml
	- or -
	http://monkey.workarea.jp/mono/unicode/gb-18030-2000.xml

	To create GB18030Source.exe, compile GB18030Source.cs as a standalone
	module:

	mcs GB18030.cs /unsafe /d:BUILD_GENERATOR

	and then run:

	mono GB18030.exe

	It expects that gb18030-2000.xml is in the same directory, and
	generates a binary file "gb18030.table".

	This table file is included as a resource in this assembly.

Atsushi Eno <atsushi@ximian.com>