_start: ; push %edx ; pop %edx ; /* magic number RZ */ movl $5 , %eax ; /* only a testing word, doesn't put 5 on the stack */ ret ; /* only returns it as the errorlevel, available as $? in bash */ /* the following is for future use, and its format may change */ word: ; .long .-_start ; /* allows us to find start of word */ 1: ; .byte 2f-1b-1 ; .ascii "FIVE" ; 2: ; .byte 2b-1b-1 ; push %eax ; pop %eax ; /* end marker */ /* ld will round up this segment to a longword boundary, with random content, so let's do it ourselves more deterministically */ .skip 4-.&3 , 0x90 ; /* 0x90 is NOP on x86 architecture */