Small "Hello World" PE file using Clang/LLVM tools (~620-676 bytes).
LLD on Windows does not seem to accept the DOS stub which causes it to be 56 bytes larger.
matt@laptop ~/D/d/smallpe> make
clang --target=x86_64-unknown-windows-none -DDOSSTUB -c -o dosstub.o smallpe.S
llvm-objcopy --dump-section=.stub=dosstub.bin dosstub.o
clang --target=x86_64-unknown-windows-none -fuse-ld=lld -nostdlib -Wl,-subsystem:console -Wl,-build-id:no -Wl,-filealign:2 -Wl,-align:2 -Wl,-merge:.rdata=.text -Wl,-stub:dosstub.bin -o smallpe.exe smallpe.S
lld-link: warning: /align specified without /driver; image may not run
matt@laptop ~/D/d/smallpe> ls -l smallpe.exe
-rwxr-xr-x. 1 matt matt 620 Apr 15 23:08 smallpe.exe*
matt@laptop ~/D/d/smallpe>PS C:\Users\User\Documents\smallpe> nmake /nologo
llvm-objcopy --dump-section=.stub=dosstub.bin dosstub.obj
clang -fuse-ld=lld -nostdlib -Wl,-subsystem:console -Wl,-build-id:no -Wl,-filealign:2 -Wl,-align:2 -Wl,-merge:.rdata=.text -Wl,-stub:dosstub.bin -o smallpe.exe smallpe.S
lld-link: warning: /align specified without /driver; image may not run
PS C:\Users\User\Documents\smallpe> ls .\smallpe.exe
Directory: C:\Users\User\Documents\smallpe
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 4/15/2026 11:10 PM 676 smallpe.exe
PS C:\Users\User\Documents\smallpe> .\smallpe.exe
Hello, world!
PS C:\Users\User\Documents\smallpe>