foo.asm contents:
END
Note: Use the x86 native tools command prompt which comes with Visual Studio for running the following commands:
ml /c /coff foo.asm
link /merge:.rdata=.text /merge:.data=.text /align:16 /subsystem:windows /dll /noentry foo.obj
You can add /debug /pdbstripped
to the link command line to generate a .pdb, but that will increase the size of the DLL, so run the 2 commands separately if you want a tiny DLL and PDB. Note that there will be a GUID mismatch, so you will have to tell your debugger to not care about matching PDB GUIDs.