Assembly segmentation fault after making a system call, at the end of my code

假如想象 提交于 2019-11-26 18:02:02

As n.m. said in the comments, the issue is that you aren't exiting the program, so execution runs off into garbage code and you get a segfault.

What you need is:

%define ___SYSCALL_EXIT 1

// ... at the end of _start:
    mov eax, ___SYSCALL_EXIT
    mov ebx, 0
    int 0x80
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!