开发者

Using objdump/readelf and extern variable

I have library ab.so compose of 2 sources file a.m, a.h and b.m, b.h

In a.m I have define a variable foo and in b.m I have declare it extern.

Now using readelf/objdump I would like to know where and how can I see my variable foo in the a.o开发者_JS百科 file, b.o and ab.so?

Thanks a lot


Tricky question. You must realize that readelf/objdump will not display C code as a result, only assembly code. If you are prepared to read that, go ahead and disassembly the application with objdump -d ab.so and look for the relevant code there.

There are a bunch of readelf/objdump tutorials available on the web. Don't be afraid to look for them.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜