I've written a simple 'Hello World' program in assembly:
global _main
extern _printf
section .text
_main:
push offset message
call _printf
add esp, 4
ret
section .data
message db 'Hello, World2', 10, 0
I've opened the compiled .EXE in Ghidra tool (freeware IDA alternative) and when I look at the generated assembly code listing, there is something like this:
push message
call _printf
add esp,0x4
My question is: why is there no offset
keyword there (like in the source)? Is it optional or so? Moreover when I'd like to patch the instruction, the tool doesn't allow me to type the offset
keyword...