|
|
|
|
|
by cryne
488 days ago
|
|
I tried to replicate this on my 64 bit machine, so nasm -f elf64 tiny.s && ld -s tiny.o
; tiny.asm
BITS 64
GLOBAL _start
SECTION .text
_start:
mov eax, 1
mov ebx, 42
int 0x80
and this lands me at 4320 bytes!
Why is there such a stark difference? |
|
Your linker must align the .text section to the page size (often 4096 bytes). If you open the binary with a hex editor you'll see lots of null padding.