怎么理解这个?

时间:2011-04-03 12:34:37

标签: assembly objcopy

来自this question

 gcc -c test.s
 objcopy -O binary test.o test.bin

test.otest.bin之间有什么区别?

.text
    call start
    str:
        .string "test\n"
    start:
    movl    $4, %eax
    movl    $1, %ebx
    pop     %ecx
    movl    $5, %edx
    int     $0x80
    ret

上面做了什么?

2 个答案:

答案 0 :(得分:10)

答案 1 :(得分:0)

.o是预链接器,.bin是后连接器。 这是关于连接符的维基百科文章: http://en.wikipedia.org/wiki/Linker_(computing) 我相信你可以从那里得到重点:)

相关问题