.data
msg: .string "hello,world\n"
len = . - msg
.text
.global _start
_start:
movl $len, %edx
movl $msg, %ecx
movl $1, %ebx
movl $4, %eax
int $0x80
movl $0, %ebx
movl $1, %eax
int $0x80
我在ubuntu上编译了这段代码
as hello.s -o hello.o
ld hello.o -o hello
当我使用命令“ ./hello”运行程序时 结果表明:分段故障(核心已丢弃)