Linux Kernel 中汇编 ENTRY()

来源:互联网 发布:macbook 装windows 编辑:程序博客网 时间:2024/06/10 16:23
Linux Kernel 中汇编 ENTRY()
2010-12-15 23:18

之前一直不知道ENTRY的意思, 在网上找了GOOGLE,BAIDU也找不到,突然在BAIDU上看到了,ENTRY是自定义之宏函数。

位于 linux-2.6.35.5/include/linux/linkage.h

-------------------------

 65   #define ENTRY(name) \

 66   .globl name; \

 67   ALIGN; \

 68   name:

-------------------------

 

这是人为定义的,就像世上很多规则, 是人设立的。


Gas .fill伪指令

.fill repeat , size , value
result, size and value are absolute expressions. 
结果,size 和 value是绝对表达式。
This emits repeat copies of size bytes. Repeat may be zero or more.  
这个伪指令用来重复拷贝size大小的字节数。repeat (重复次数)可以是零或更大。
Size may be zero or more,but if it is more than 8, then it is deemed to have the value 8, compatible with other people's assemblers. 
size可以是零或更大,但是如果size比8大, 为了和其他的汇编器兼容,它的值会被认为是8。

The contents of each repeat bytes is taken from an 8-byte number. The highest order 4 bytes are zero. The lowest order 4 bytes are value rendered in the byte-order of an interger on the computer as is assembling for. 
每个重复拷贝的内容被降低自于一个8字节的数。最高顺序4字节是零。最低顺序字节是value的值,在电脑上用一个字节顺序的汇编整数来表示。

Each size bytes in a repetition is taken from the lowest order size bytes of this number. Again, this bizarre behavior is compatible with other people's assemblers.
每个size 字节被降低来自最低顺序字节数。同样的, 这些奇怪的行为也是为了和别的汇编器兼容。

    size and value are optional. If the second comma and value are absent, value is assumed zero. If the firsr comma  and following tokens are
absent, size is assumed to be 1.
size 和 value 是可选的。 如果第二个分号和value不写, value 就被假定为1。如果第一个分号和后面的tokens 不写,size 就被假定为1。

原创粉丝点击