hidden symbol `__fini_array_end' in xmlwf/.libs/xmlwf is referenced by DSO
来源:互联网 发布:手机免费宅男看片软件 编辑:程序博客网 时间:2024/06/06 03:55
http://stackoverflow.com/questions/23696585/what-does-exactly-the-warning-mean-about-hidden-symbol-being-referenced-by-dso
What is a DSO?
A DSO is a Dynamic Shared Object, or less formally a shared library.
What is a hidden symbol?
A hidden symbol is a symbol (i.e. name of function or data object) that has been compiled with hidden linkage, e.g. as per the (GCC specific) declaration:
int x __attribute__ ((visibility ("hidden")));
If x
is defined in one DSO then dynamic linkage cannot reference it from a different DSO. The linker can see x
(it is not static
), but it is not available for dynamic linkage. Documentation here
How can it be referenced, if it's hidden?
It can't be, which is what you are being warned about. E.g. the linktime warning:
hidden symbol `stat' in /usr/lib/libc_nonshared.a(stat.oS) is referenced by DSO
is telling you that a DSO in the linkage references the symbol stat
, and the linker can locate a definition of stat
in /usr/lib/libc_nonshared.a
, but (obviously) that definition is not in the DSO that references it and cannot be referenced from that DSO, because it is hidden.
You get this problem if the problem DSO has not been built correctly for use as a DSO. See this example and follow the follow-ups for the solution.
Continued for OP's followups
If hidden symbol is already referenced by some DSO, then why the problem is with DSO?
The linker is saying:
The DSO X
contains a reference to symbol S
. I can find a definition of symbol S
is another linked module Y
, but that definition will not be available to satisfy the reference in X
dynamically (i.e. at runtime) because S
has hidden linkage in Y
.
I can confirm that the problem comes with a non-shared object [...][but] I don't explicitly hide those symbols in my non-shared object.
You may not have explicitly marked any symbols hidden in the non-shared object. Depending on how it was built, symbols may be hidden by default unless explicitly marked otherwise.
Say the non-shared object is libnonshared.a
and the allegedly hidden symbol is foo
. Run:
objdump -t libnonshared.a
to get info about the symbols in libnonshared.a
. In the output, look for the entry for foo
. Does it contain the tag .hidden
? - e.g.
0000000000000000 g F .text 000000000000000b .hidden foo
This entry says that foo
is a global symbol (marked g
- that's why the linker is able to see it) but it's hidden for dynamic linkage.
If this turns out to be the case then you need to go and fix the build of libnonshared.a
so that it doesn't hide foo
. If not, then I'm stumped.
- hidden symbol `__fini_array_end' in xmlwf/.libs/xmlwf is referenced by DSO
- hidden symbol ... is referenced by DSO
- hidden symbol ... is referenced by DSO
- hidden symbol ... is referenced by DSO
- hidden symbol ... is referenced by DSO 解决办法
- hidden symbol ... is referenced by DSO
- 编译C++程序时报错:hidden symbol ... is referenced by DSO
- (OK) cannot locate symbol referenced by (math symbols in libgcc.a sneaking into dynamic libraries)
- (OK) cannot locate symbol "__sF" referenced by
- Error LNK2019:Unresolved External Symbol *** Referenced In
- unresolved external symbol __imp___CrtDbgReportW referenced in function
- mysql-libs is needed by (installed) postfix
- 08 scala, imported `Record' is permanently hidden by definition of class Record in package test
- /usr/bin/ld: client: hidden symbol `__dso_handle' in /usr/lib/gcc/i486-linux-gnu/4.4.3/crtbegin.o is
- "cannot locate symbol "sqlite3_enable_load_extension" referenced by "sqlite3" 问题解决
- failed: dlopen failed: cannot locate symbol "rand" referenced by
- Android ndk cannot locate symbol "atof" referenced by的解决方法
- dlopen failed: cannot locate symbol "atof" referenced by "xxx.so"
- hdu2026
- (java)leetcode Number of 1 Bits
- poj-2250Compromise(LCS+标记数组)
- Understanding iOS Exception Types
- CSDN Markdown简明教程3-表格和公式
- hidden symbol `__fini_array_end' in xmlwf/.libs/xmlwf is referenced by DSO
- 为什么要用EL+JSP标签而不用JSP脚本
- 利用viewPager实现的自动滑动的广告栏
- GDB使用方法
- Redis入门
- MySQL学习笔记(一)MAC系统下 MySQL服务启用、停止、卸载
- Linux 强大的nohup(进程后台执行)
- 配置Java Web中文乱码的过滤器
- JavaWeb学习笔记--HTTP协议