admin管理员组文章数量:1208155
What do the symbols mean in this assembly language statement:
.size _start, . - _start
I've searched and found quite a few identical examples and several variations but none explain what the components mean. The doc says that for ELF the format is .size name , expression
. I think it's saying the size is 'something' minus the address of _start
. Is that right and, if so, what is the 'something'?
What do the symbols mean in this assembly language statement:
.size _start, . - _start
I've searched and found quite a few identical examples and several variations but none explain what the components mean. The doc says that for ELF the format is .size name , expression
. I think it's saying the size is 'something' minus the address of _start
. Is that right and, if so, what is the 'something'?
1 Answer
Reset to default 4I think it's saying the size is 'something' minus the address of
_start
. Is that right and, if so, what is the 'something'?
That's right, and that 'something' is actually the location counter which is the position in your program that is currently being processed by the assembler. Your particular assembler uses a dot . for this, while many other assemblers use a dollar sign $.
And as @fuz wrote in a comment, if the location counter is currently at the end of the _start function, the difference between the location counter and the address where the function begins gives its size.
本文标签: assemblyWhat does this mean sizestartstart in assemblerStack Overflow
版权声明:本文标题:assembly - What does this mean: .size_start, . - _start in assembler? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738729634a2109246.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
_start
to the size of the function_start
when given right after the rnd of the function. – fuz Commented Jan 19 at 17:10rnd
a typo forend
? – Sep Roland Commented Jan 19 at 18:26.fnstart
and.fnend
might be clearer syntax to some (in link above). – artless-noise-bye-due2AI Commented Jan 21 at 17:51