Just to give you some context, here s what I m trying to achieve: I am embedding a const char* in a shared object file in order to have a version string in the .so file itself. I am doing data analysis and this string enables me to let the data know which version of the software produced it. This all works fine.
我在试图直接阅读图书馆的插播节目时,会遇到这个问题。 我试图使用
nm libSMPselection.so | grep _version_info
并且
000000000003d968 D __SMPselection_version_info
this is all fine and as expected (the char* is called _SMPselection_version_info). However I would have expected to now be able to open the file, seek to 0x3d968 and start reading my string, but all I get is garbage.
当我打开案卷并简单地搜查行踪的内容时(我知道它是如何开始的),我可以找到地址是0x2e0b4。 在该地址,零按期终止。 (我现在使用这种方法)
我不是一个计算机科学家。 请允许我向我解释,如果Nm isn t正确,或以不同方式显示的象征价值没有文号,那么该数值究竟是什么?
(我与SOSX一道在澳门工作的方式10.7)