07-24-2023, 05:57 AM
I came across this snippet of code:
section .text
global main ;must be declared for linker (gcc)
and then there is a function called main after this line:
main: ;tell linker entry point
but i don't seem to understand what `global main` means, and the comment doesn't seem to help much...
i am using [this site][1] as a reference to Assembly language programming.
i can analyse that `main` refers to the function main, but i don't understand the use of the `global` keyword...
thank you in advance...
[1]:
section .text
global main ;must be declared for linker (gcc)
and then there is a function called main after this line:
main: ;tell linker entry point
but i don't seem to understand what `global main` means, and the comment doesn't seem to help much...
i am using [this site][1] as a reference to Assembly language programming.
i can analyse that `main` refers to the function main, but i don't understand the use of the `global` keyword...
thank you in advance...
[1]:
[To see links please register here]