Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
要在备用glibc安装中使用加载器/usr/test,我已将加载器路径更改/lib/ld-linux-x86-64.so.2为gcc 规范文件中的部分/usr/test/lib/ld-linux-x86-64.so.2下。我还指出和。*linkCPATH/usr/test/lib/includeLIBRARY_PATH/usr/test/lib
/usr/test
/lib/ld-linux-x86-64.so.2
/usr/test/lib/ld-linux-x86-64.so.2
*link
CPATH
/usr/test/lib/include
LIBRARY_PATH
/usr/test/lib
这是使用备用glibc的正确方法吗?
我不知道正确,但我更喜欢为这种测试设置一个 chroot 环境。您也可以使用 LD_PRELOAD 机制。
是的,没有。
是的,如果 /usr/test 中的 glibc 具有足够接近系统 glibc 的版本。
不,因为 glibc 标头可能彼此不兼容。然后 gcc 从fix-include 机制中失败。