博文

目前显示的是 二月, 2011的博文

关于asm-offsets的一些说明

对Kbuild里面的asm-offsets一直不太清楚,找到了一个RFC,并简单翻译了一下。详见http://marc.info/?l=linux-kernel&m=100219616028442&w=2 Almost every architecture generates Assembler values to map the offsets of fields in C structures, about the only exception is i386 and that is because its offsets are hard coded into entry.S. Every arch has done it differently, none of them have got it exactly right. 几乎所有的体系结构都会产生汇编的值去和C语言中的数据结构各个域的偏移相对应。但x86是一个例外,因为它的偏移是硬编码的,具体可以参考entry.S.没一种体系结构都是不一样的,但几乎没有一个能够对应的十分准确。 As part of kbuild 2.5 I am standardizing on one method for generating Assembler offsets. This change is required for kbuild 2.5 but it can be added to 2.4 without disturbing the current kbuild, I want to do this gradually now instead of a single massive change in kernel 2.5. I will be issuing per architecture changes for generating Assembler offsets against 2.4. 从kbuild2.5开始,我就开始做了一个标准化的方法去生成汇编的相对偏移。如果你的kbuild是2.4版本的,也可以是用kbuild2.5的这个标准化方法。我想逐步的把这个方法加入到2.5的Linux Kernel中,重点是针对各个架构的不同点。 The kbuild 2.5 method