0
다음 코드에서 세그먼트 오류가 발생합니다. GDB에서 실행하는 동안 Segfault in Assembly Code
.section .data
myarray:
.int 10,20,30,40,50,60
format:
.ascii "%d\n"
.section .text
.globl _start
_start:
movl $2, %ebx
movl myarray(,%ebx,4) , %ecx
pushl %ecx
pushl $format
addl $8,%esp
call printf
movl $1,%eax
movl $0,%ebx
int $0x80
, 나는 내가 잘못 가고 어디를 가리하십시오
Program received signal SIGSEGV, Segmentation fault.
strchrnul() at ../sysdeps/i386/strchrnul.S:68
68 ../sysdeps/i386/strchrnul.S: No such file or directory.
in ../sysdeps/i386/strchrnul.S
을 얻고있다.
Perfect !. 나는 오늘 esp에 필요한 스택 작업을 배우므로 그 위치를 놓쳤습니다. 노력과 시간을 보내 주셔서 감사합니다. 연습을 위해 리눅스와 GNU 어셈블러를 사용하고 있습니다. –