The entry point of an executable is the memory address of the main function?

2

hello.c

#include <stdio.h>

void main(void){ // << entry point
    printf("Hello World!");
}

hello.asm

    global  _main 
    extern  _printf

    section .text
_main: ; << entry point
    push    message
    call    _printf
    add     esp, 4
    ret
message:
    db  'Hello, World!', 10, 0
    
asked by anonymous 20.11.2018 / 17:31

1 answer

2

Roughly, yes. It's not what it needs to be, but it usually is, at least it's the default. Always have to start running somewhere and this is the most obvious.

    
20.11.2018 / 17:38