【发布时间】:2017-07-11 09:47:07
【问题描述】:
我必须使 ELF 文件使用库的绝对路径,而不是在默认路径 (RPATH) 中搜索。
这是来自 readelf 的结果:
readelf -d example
Dynamic section at offset 0xe28 contains 24 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
但我想得到这样的东西:
readelf -d example
Dynamic section at offset 0xe28 contains 24 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [/lib/libc.so.6]
是否有任何链接器选项可以实现此目的?
【问题讨论】:
标签: gcc linker ld elf toolchain