I finally updated dllmerge to make it more practical:
I'd like some feedback about possible future improvements,
DllMerge is an utility for embedding statically bound dlls into exes.
Example: m1.exe needs pthreadGC2.dll, but m1d.exe (produced by dllmerge, see test.bat)
doesn't have any external dependencies.
There're other similar tools (eg. pebundle) but they usually work by hooking
winapi used for dll load, which makes them useless for some of possible purposes.
- making a standalone .exe from a program with a few dlls, which makes it more portable
- exe compression improvement (all code can be compressed together, instead of per-file)
- software protection (its harder to locate and hook calls to a specific library in a merged exe)
- reverse-engineering (most RE tools - eg. ida pro - don't support programs with multiple files)
- no x64 support (yet)
- only type=3 relocs are supported
- redundant dll's reloc data remains in a merged exe (old workaround with MS rebase still works though)
- advanced cases using TLS,PE checksums,delayed imports,security records,etc frequently cause problems.
The usual workaround is to remove these things manually before merging.
- dllmerge only performs exe1+dll->exe2, so merging with multiple dlls requires multiple runs
of dllmerge with temp intermediate exes.
also probably some weird test cases where it doesn't work would be useful.