I was writing a c program for windows, and compiling it with: cl test.c
and I noticed that the file size was 95744 bytes.
I thought that was strange so I began shortening the program to see if that would affect the size of the executable, but it stayed the same, I eventually just compiled an empty main function, with the same result, I attempted the same program on wsl2, compiling it with gcc test.c -o test
and ran size on the elf which outputted:
text data bss dec hex filename
1224 544 8 1776 6f0 test
does anyone know why this is or how to make the output smaller?
any help is greatly appreciated.