linux - 使用链接器标志复制 dlopen 的 RTLD_DEEPBIND 行为

标签 linux linker shared-libraries dlopen

是否存在会在指定库上复制 RTLD_DEEPBIND 行为的链接器标志?

我试图避免必须dlopen我的库并为每个函数调用dlsym只是为了获得RTLD_DEEPBIND行为。即使有办法dlopen,然后在没有dlsym的情况下自动解析符号,这也是一个可以接受的解决方案。

dlopen 引用:http://linux.die.net/man/3/dlopen

最佳答案

Is there a linker flag that would duplicate the behavior of RTLD_DEEPBIND on a specified library?

是:-Bsymbolic

注意:-BsymbolicRTLD_DEEPBIND 都很难调试 side effects .

关于linux - 使用链接器标志复制 dlopen 的 RTLD_DEEPBIND 行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35088681/

相关文章:

c++ - 链接器错误 |收集 2 : error: ld returned 1 exit status

opencv - 加载共享库时出错 : libcudart. 所以

linux - 在 Bash 中识别接收到的信号名称

Java没有接受环境变量

mysql - perl dbi mysql - 值精度

c++ - 在动态库中链接时如何解析符号

linux - 关于共享库的问题

linux - 如何在 Ubuntu 中使用 Python 打开外部程序?

c++ - "Adding"功能共享对象?

gcc - "Hidden symbol ` atexit ' is referenced by DSO"将 libtool 与 gcov 一起使用时