这些符号名称中的 "at sign" @ 是什么意思?
What does the "at sign" @ mean in these symbol names?
我正在调试对以下符号的未定义引用(elf amd64 东西)
//usr/lib/x86_64-linux-gnu/libSM.so.6: undefined reference to `uuid_generate@UUID_1.0'
所以我 grep 了那个文件中的符号并找到了相同的符号但是有另一个 "at sign"
(pyws) STRM ~/.../etc/conda/activate.d $ readelf -s /lib/x86_64-linux-gnu/libuuid.so.1 | grep uuid_generate
67: 0000000000002370 135 FUNC GLOBAL DEFAULT 13 uuid_generate@@UUID_1.0
所以我的问题是:
1) @
符号在符号名称中的含义是什么?
2) uuid_generate@@UUID_1.0
和uuid_generate@UUID_1.0
有什么区别
@JohnBollinger 链接的页面中的文档提供了答案:
https://akkadia.org/drepper/dsohowto.pdf
The symbol defined using @@ is the default definition. There
must be at most one. It is the version of the symbol used
in all linker runs involving the DSO. No symbol defined
using @ are ever considered by the linker. These are the
compatibility symbols which are considered only by the
dynamic linker
我正在调试对以下符号的未定义引用(elf amd64 东西)
//usr/lib/x86_64-linux-gnu/libSM.so.6: undefined reference to `uuid_generate@UUID_1.0'
所以我 grep 了那个文件中的符号并找到了相同的符号但是有另一个 "at sign"
(pyws) STRM ~/.../etc/conda/activate.d $ readelf -s /lib/x86_64-linux-gnu/libuuid.so.1 | grep uuid_generate
67: 0000000000002370 135 FUNC GLOBAL DEFAULT 13 uuid_generate@@UUID_1.0
所以我的问题是:
1) @
符号在符号名称中的含义是什么?
2) uuid_generate@@UUID_1.0
和uuid_generate@UUID_1.0
@JohnBollinger 链接的页面中的文档提供了答案:
https://akkadia.org/drepper/dsohowto.pdf
The symbol defined using @@ is the default definition. There must be at most one. It is the version of the symbol used in all linker runs involving the DSO. No symbol defined using @ are ever considered by the linker. These are the compatibility symbols which are considered only by the dynamic linker