Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Tool:MinGW

From ReverseEngineering.wiki
Tool
Platforms Windows
License GPL / ZPL (runtime)
On this wiki Facts · Code · Notes · Topics

MinGW and MinGW-w64: GCC and GNU binutils targeting Windows. PE output has a GNU ld linker version of 2.xx, the Microsoft-style DOS stub without a Rich header, '.eh_frame' and '.file' debug data, and 'GCC: (...)' strings in .rdata.

Identification

From the Detect It Easy rule (Tool:Detect It Easy, compiler_MinGW.6.sg):

  • The optional-header linker version is major 2 and minor typically 22-30, 36, 41, 44 or 56 (the binutils version), the DOS stub is the plain Microsoft one with e_lfanew 0x80 and there is no Rich header (Format:PE (Portable Executable)/Rich header); if a .rsrc section exists it must not end with a Microsoft copyright string.
  • The compiler version is readable from the text GCC: ( ... in .rdata (or gcc- path text), e.g. GCC: (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) 13.2.0.
  • Old MinGW 2.9x entry bytes: 55 89 E5 83 EC .. E8 .. .. .. .. 55 89 E5 83 EC .. 53 83 C4 .. 68.
  • Files with mingw in the first 256 bytes of .rdata, a .buildid section, or a stripped file with no overlay are also taken as MinGW. Unstripped files have an overlay starting .file 00 00 00 (COFF symbol table kept).
  • Sections like .eh_frame, .ctors/.dtors and .bss after .data are typical.

See also Platform:Microsoft Visual C++ ABI for the MSVC side and Technique:Identifying the toolchain of a binary. Free Pascal binaries also use GNU ld, so DIE excludes them first.