android - 为什么共享库中存在展开符号

标签 android c++ compilation symbols static-linking

我在拥有的共享库之一上使用readelf。当我阅读这些符号时,包含许多展开符号的列表如下所示。

23: 001e0c48 36 FUNC GLOBAL DEFAULT 13 _Unwind_Resume

5998: 00000000 0 FUNC WEAK DEFAULT UND __gnu_Unwind_Find_exidx

5999: 001e0b54 0 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_Restore_VFP_D

6000: 001e0b44 0 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_Restore_VFP

6001: 001e0b64 0 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_Restore_VFP_D_16_to_31

6002: 001e0b74 0 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_Restore_WMMXD

6003: 001e0bfc 0 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_Restore_WMMXC

6005: 001e0080 8 FUNC GLOBAL DEFAULT 13 _Unwind_GetCFA

6006: 001e0088 164 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_RaiseException

6007: 001e012c 28 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_ForcedUnwind

6008: 001e0148 116 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_Resume

6009: 001e01bc 32 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_Resume_or_Rethrow

6010: 001e01dc 4 FUNC GLOBAL DEFAULT 13 _Unwind_Complete

6011: 001e01e0 24 FUNC GLOBAL DEFAULT 13 _Unwind_DeleteException

6012: 001e01f8 92 FUNC GLOBAL DEFAULT 13 _Unwind_VRS_Get

6013: 001e027c 92 FUNC GLOBAL DEFAULT 13 _Unwind_VRS_Set

6014: 001e0304 200 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_Backtrace

6018: 001e07d0 864 FUNC GLOBAL DEFAULT 13 _Unwind_VRS_Pop

6019: 001e0b5c 0 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_Save_VFP_D

6020: 001e0b4c 0 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_Save_VFP

6021: 001e0b6c 0 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_Save_VFP_D_16_to_31

6022: 001e0bb8 0 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_Save_WMMXD

6023: 001e0c10 0 FUNC GLOBAL DEFAULT 13 __gnu_Unwind_Save_WMMXC

6025: 001e0c24 36 FUNC GLOBAL DEFAULT 13 ___Unwind_RaiseException

6026: 001e0c24 36 FUNC GLOBAL DEFAULT 13 _Unwind_RaiseException

6027: 001e0c48 36 FUNC GLOBAL DEFAULT 13 ___Unwind_Resume

6028: 001e0c6c 36 FUNC GLOBAL DEFAULT 13 ___Unwind_Resume_or_Rethrow

6029: 001e0c6c 36 FUNC GLOBAL DEFAULT 13 _Unwind_Resume_or_Rethrow

6030: 001e0c90 36 FUNC GLOBAL DEFAULT 13 ___Unwind_ForcedUnwind

6031: 001e0c90 36 FUNC GLOBAL DEFAULT 13 _Unwind_ForcedUnwind

6032: 001e0cb4 36 FUNC GLOBAL DEFAULT 13 ___Unwind_Backtrace

6033: 001e0cb4 36 FUNC GLOBAL DEFAULT 13 _Unwind_Backtrace

6035: 001e113c 16 FUNC GLOBAL DEFAULT 13 _Unwind_GetRegionStart

6036: 001e114c 28 FUNC GLOBAL DEFAULT 13 _Unwind_GetLanguageSpecificData

6037: 001e1168 8 FUNC GLOBAL DEFAULT 13 _Unwind_GetDataRelBase

6038: 001e1170 8 FUNC GLOBAL DEFAULT 13 _Unwind_GetTextRelBase



我检查了库的源代码,但找不到对这些符号的引用。我猜,在编译源文件或链接到库时,它们可能使用了一些标志来生成这些符号。

知道哪个clang++标志用于生成这些符号吗?
这些符号的用途是什么?

最佳答案

我会说这是异常处理,如果不使用异常,则可以使用-fno-exceptions进行编译

https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/libgcc-sman.html

关于android - 为什么共享库中存在展开符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52996679/

相关文章:

android - Android 设备中的内存和存储

android - 创建 iPhone 风格的标签

android - Mac OS 的 OpenJDK 8 不可用

compilation - 如何编译ADB(Android调试桥)的源代码?

java - 如何构建 JVM 项目来隔离专有代码?

android - Google map for android 我的位置自定义按钮

c++ - 为具有 `char` 的整数变量输入 `std::cin` 时的未定义行为

c++ - 列出我的计算机上安装的物理驱动器

python - 如何在C++ Builder 2010(非Delphi)应用程序中嵌入Python?

performance - 更改较少文件后,Magento 2 加载速度非常慢