for the windows surgical linker, it would be convenient to have a fairly empty DLL to use as a base. I tried making one with zig, but it insists on adding a bunch of extra junk that we don't need.
for linux, we've had success with using an object file (like the one above) and turning that into a .so
(shared object) using the system linker. I'm hoping someone on windows can take the .obj
above and turn it into a .dll
in a similar way.
There seems to be very little material about using a linker manually on windows. I'd expect something like
ld windows_dummy.obj -o windows_dummy.dll
but it likely needs some sort of -dynamic
or -shared
flag to work.
you might be able to use the linker through the C compiler
cc -Os -s windows_dummy.obj windows_dummy.dll
Last updated: Jul 06 2025 at 12:14 UTC