Reputation: 31
I am new at assembly language.
I have been studying it but i am confused between these two: global _main
and global _start
..
If anyone knows it, please help!
Upvotes: 2
Views: 2572
Reputation: 3119
main
or _main
or main_
(OpenWatcom) is known to the C language, and is call
ed by "startup code" which is "usually" linked to - if you're using C.
_start
is known to the linker ld
(in Linux) as the default entrypoint (another symbol can be used) and is not call
ed. Thus, there is no return address on the stack. Stack starts with number of arguments. Your OS may differ.
Upvotes: 4