我看起来很普通.S
在 __mmap_switched:
.long init_thread_union + THREAD_START_SP @ sp //for stack pointer
THREAD_START_SP 在“thread+info.h”中定义为 THREAD_SIZE(8192) - 8
设置堆栈大小为 8KB(8129) 和负 8 字节。
为什么要减去 8byte?
我怀疑,我认为 DA(之后递减)对吗?
最佳答案
8字节对齐是APCS中的要求。
在 APCS 中,第 5.2.1 章堆栈,
堆栈还必须在公共(public)接口(interface)处符合以下约束:
SP mod 8 = 0。堆栈必须是双字对齐的。
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.subset.swdev.abi/index.html
关于linux-kernel - ARM linux 内核 head-common.S,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7874351/