开发者

How to get the address value of a function in assembly

In gc开发者_JAVA百科c assembly code listed below, I want to store the address of function foo to var, how do i do it? Thanks.

.text
.globl foo
foo:
/* do something */

.data
.globl var
var:
    .long /* the address of foo */


Have you tried this?

 .long foo
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜