开发者

How to get the address value of a function in assembly

开发者 https://www.devze.com 2023-04-07 21:10 出处:网络
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.

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

精彩评论

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

关注公众号