gpt4 book ai didi

android - .so(共享库)文件中的符号名称是如何生成的?

转载 作者:太空宇宙 更新时间:2023-11-04 09:27:04 24 4
gpt4 key购买 nike

在共享库文件中生成的符号名称是如何出现的?例如,使用elfread -Ws读取libutils.so文件(android系统utils库)中的符号时,得到几个格式的符号名:

_ZN7android10VectorImpl14insertVectorAtERKS0_j 

等你如何解读这个符号名称?

最佳答案

这似乎是一个错位的名称,例如,对于 C++,您可以使用 nm-C 选项更好地理解这些名称。 :

-C
--demangle[=style]
Decode (demangle) low-level symbol names into user-level names. Besides removing any initial underscore prepended by the system, this makes C++ function names readable. Different compilers have different mangling styles. The optional demangling style argument can be used to choose an appropriate demangling style for your compiler. See c++filt, for more information on demangling.

在共享库上使用 nm 时,此选项显示它们的符号:

-D
--dynamic
Display the dynamic symbols rather than the normal symbols. This is only meaningful for dynamic objects, such as certain types of shared libraries.

关于android - .so(共享库)文件中的符号名称是如何生成的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35329314/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com