]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cmake: hide symbols import from other libraries in libcls_* 21571/head
authorKefu Chai <kchai@redhat.com>
Fri, 20 Apr 2018 13:59:29 +0000 (21:59 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 20 Apr 2018 17:02:21 +0000 (01:02 +0800)
commit3f24a7da92a77d376116fb1cd5047fa30b42088d
tree0e2164c24d5e769a9f13359e974a32933a9f73b3
parent7075470c3cb3ff167602b9b43f4e74c9608a5fde
cmake: hide symbols import from other libraries in libcls_*

so they will not be involved when resolving symbols. ld tries to
keep a shared library around even if it fails to load it if it offers
some unique symbols. in that case, the library will not be properly
unloaded, and even worse it will interfere with following dlopen()
calls, because it is marked with NODELETE by dlopen(). if it has some
unresolved symbol and does offer some "unique" symbols required by
the library to be loaded, the library will fail to load, despite the
fact that the "unique" symbol is also offered by the executable.

for more details, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60731 and
https://sourceware.org/bugzilla/show_bug.cgi?id=14577

Fixes: http://tracker.ceph.com/issues/23517
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/cls/CMakeLists.txt