Open Hugne opened 2 years ago
0.10.0-dev.1487+916a65cb7
//main.zig export fn entry() void {}
zig.exe build-lib main.zig -target x86_64-windows -fno-stack-check -fPIC -fno-soname -fno-unwind-tables -dynamic -fsingle-threaded --entry entry
dumpbin.exe main.dll /EXPORTS ... ordinal hint RVA name 1 0 00001C90 _DllMainCRTStartup = _DllMainCRTStartup 2 1 00001B60 entry = entry ...
The final DLL should only contain a single entry export, which is the DLL entrypoint.
entry
DllMainCRTStartup is linked in from dllcrt2.obj and reexported in the final DLL.
-fno-export-dll-fns works around this. But that cannot be set in build.zig, only passed as option to build-lib.
Zig Version
0.10.0-dev.1487+916a65cb7
Steps to Reproduce
zig.exe build-lib main.zig -target x86_64-windows -fno-stack-check -fPIC -fno-soname -fno-unwind-tables -dynamic -fsingle-threaded --entry entry
Expected Behavior
The final DLL should only contain a single
entry
export, which is the DLL entrypoint.Actual Behavior
DllMainCRTStartup is linked in from dllcrt2.obj and reexported in the final DLL.