gendef(1)
π gendef(1) β the DLL export extractor that ate π
okay bestie, welcome to gendef, from the General Commands Manual section, and honestly? she's a little legend. π«Ά
β¨ NAME β¨
gendef β DLL export extractor, aka the girl who reads your DLLs and tells you what they're exporting π
π¦ SYNOPSIS π¦
gendef [options] <DLL>
πΈ DESCRIPTION πΈ
So basically, gendef dumps DLL export information out of 32-bit and 64-bit Windows executables. And when we say 32-bit and 64-bit, we mean PE32 and PE32+ executables respectively, because names matter, periodt. π
π OPTIONS π
-β dump it straight to stdout, no file, no drama, just vibes β¨-h,--helpβ gives you the quick lil rundown of the syntax and the options. the tl;dr of it all π«Ά-a,--assume-stdcallβ tells gendef to assume that functions with ambiguous calling conventions are using stdcall. lowkey a lifesaver, see KNOWN ISSUES below π-I,--include-def-path<path>β adds extra search paths where gendef should go looking for hint.deffiles. she's nosy, let her look π-f,--no-forward-outputβ do not output the forwarders. bye forwarders π
π OUTPUT π
By default, gendef writes the DLL export information to a file that's named after the DLL β specifically, it takes the name and swaps .dll for .def. cute, consistent, iconic. π
π KNOWN ISSUES π
okay so here's the tea, and it's a lil annoying ngl:
For 32-bit DLLs, gendef cannot detect whether a function with no return value (void) exported by a DLL uses stdcall or cdecl. the struggle. π©
Two workarounds, bestie, pick your fighter:
- Use the
-aoption to force stdcall calling conventions. - Generate
.deffiles for any DLLs that the DLL you're interested in depends upon.gendefwill read other.deffiles found in the working directory to figure out the calling convention in use. slay π§
64-bit DLLs are not affected by any of this, because they only use a single calling convention. no ambiguity, no problem, main character energy fr fr β¨
π SEE ALSO π
genidl(1) β go say hi to her too π«Ά
π AUTHORS π
gendef was written by Kai Tietz and Jonathan Yong of the MinGW-w64 project. legends, honestly. π₯
This manual page was written by Stephen Kitt <steve@sk2.org>, based on information provided with the program and in the project's wiki, for the Debian GNU/Linux system (but may be used by others). we love a cross-distro queen π
π and that's the whole page bestie!! this one's from thegendefmanpage, dated Oct 6, 2011, filed undergendef(1)in the General Commands Manual. mwah, go extract some exports πβ¨π¦
π¦ where this page comes from
- debian bookworm: mingw-w64-tools 10.0.0-3 Β· ZPL-2.1
- debian trixie: mingw-w64-tools 12.0.0-5 Β· ZPL-2.1
- ubuntu jammy: mingw-w64-tools 8.0.0-1 Β· ZPL-2.1
- ubuntu noble: mingw-w64-tools 11.0.1-3build1 Β· ZPL-2.1
- ubuntu questing: mingw-w64-tools 12.0.0-3
- ubuntu resolute: mingw-w64-tools 13.0.0-2ubuntu1 Β· ZPL-2.1
- ubuntu stonking: mingw-w64-tools 13.0.0-2ubuntu1 Β· ZPL-2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms