summaryrefslogtreecommitdiff
path: root/src/list.c
diff options
context:
space:
mode:
authorCarlos Maniero <carlos@maniero.me>2023-05-10 14:26:40 -0300
committerCarlos Maniero <carlos@maniero.me>2023-05-10 14:26:40 -0300
commit2cf0bcb409f3a1fd298b664103d57c945c6349f5 (patch)
tree6756f530d3007d529fae11fd0168c235355bc220 /src/list.c
parentf1b1c191975581d5ef13bd04f33b6965235d00b4 (diff)
gas: Removes Linux entrypoint logic from function declaration
Before this commit, function declarations were making syscalls to interrupt the flow. This is a fair approach considering all our examples just have a main function. But won't work if the namespace has more then a single function. The return now always sets the return value on RAX and jumps to the function return label. The function return label, will restore RBP and jump back to callee's next instruction using RET instruction. Function labels are kept, which means that a function called my_fn will have the assembly label my_fn, so then, they can have INTEROP with other languages. Signed-off-by: Carlos Maniero <carlos@maniero.me>
Diffstat (limited to 'src/list.c')
0 files changed, 0 insertions, 0 deletions