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 .def files. 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:

  1. Use the -a option to force stdcall calling conventions.
  2. Generate .def files for any DLLs that the DLL you're interested in depends upon. gendef will read other .def files 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 the gendef manpage, dated Oct 6, 2011, filed under gendef(1) in the General Commands Manual. mwah, go extract some exports πŸ’–βœ¨πŸ¦‹