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

Asked

Viewed 70 times

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

1 answer

2


Roughly speaking, yes. It’s not that it needs to be, but it usually is, at least it’s the standard. Always have to start running somewhere and this is the most obvious.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.