小编use*_*613的帖子

在Cygwin中由GNU Assembler运行hello.s时出现分段错误

我在Cygwin中使用gcc(在Windows7-64位中)运行此示例 http://asm.sourceforge.net/howto/build.html

.data                   # section declaration
msg:
    .ascii  "Hello, world!\n"   # our dear string
    len = .-msg         # length of our dear string
.text                   # section declaration
            # we must export the entry point to the ELF linker or
    .global _start  # loader. They conventionally recognize _start as their
            # entry point. Use ld -e foo to override the default.
_start:
# write our string to stdout
    movl    $len,%edx   # third argument: message length
    movl    $msg,%ecx   # second argument: pointer …
Run Code Online (Sandbox Code Playgroud)

assembly cygwin gnu windows-7-x64

2
推荐指数
1
解决办法
802
查看次数

标签 统计

assembly ×1

cygwin ×1

gnu ×1

windows-7-x64 ×1