在Linux源代码树中,文件arch/x86/boot/header.S具有类似于此的x86代码,用于在调用
为什么要在
main
之前清除BSS部分。...
# Zero the bss
movw $__bss_start, %di
movw $_end+3, %cx
xorl %eax, %eax
subw %di, %cx
shrw $2, %cx
rep; stosl
...
为什么要在
_end
地址上加 3?为什么不用 movw $_end, %cx
而是用 movw $_end+3, %cx
?