Binutils LD creates huge files
问题 I'm trying to create as small ELF as possible. I created a test file like this (NASM syntax): SECTION .text dd 0xdeadbeef With this linker script: SECTIONS { .text : { *(.text) } } Then I checked sizes of flat binary and ELFs built two ways: nasm -f bin -o test test.asm It's flat binary, so 4 bytes. nasm -f elf -o test.o test.asm i686-elf-ld -Tlinker.ld test.o -o test I'd expect something like 500 bytes max, but the resulting file is 4396 bytes long! There is an option however, named --strip