- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在为 armhf 进行交叉编译,编译过程很顺利,但是 GLIBC 版本很旧,./libc.so.6 显示它是由 gcc 4.6.3 编译的,不幸的是我在 apt-get 上找不到这个旧版本。所以我尝试使用 follow LDFLAG 选项重新定位 lib 路径。
-Wl,-rpath,/boxer/lib -Wl,--dynamic-linker,/boxer/lib/ld-linux-armhf.so.3
并部署了相应的库到/boxer/lib,但问题没有解决,./ld-linux-armhf.so.3 --list显示ld链接正确地方,但是,正如你在下面看到的,其余的不是。
root@cubieboard2:/lib/arm-linux-gnueabihf# ./ld-linux-armhf.so.3 --list /boxer/frida-server
/boxer/frida-server: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.17' not found (required by /boxer/frida-server)
libresolv.so.2 => /lib/arm-linux-gnueabihf/libresolv.so.2 (0xb6f7a000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6f6e000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6f53000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6e6f000)
/boxer/lib/ld-linux-armhf.so.3 => ./ld-linux-armhf.so.3 (0xb6f9e000)
有什么建议吗?谢谢。
更新:
这是LD_TRACE_LOADED_OBJECTS=1
选项的结果,好像和上面一样
root@cubieboard2:/boxer# LD_TRACE_LOADED_OBJECTS=1 /boxer/frida-server
/boxer/frida-server: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.17' not found (required by /boxer/frida-server)
libresolv.so.2 => /lib/arm-linux-gnueabihf/libresolv.so.2 (0xb6f10000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6f05000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6eea000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6e06000)
/boxer/lib/ld-linux-armhf.so.3 (0xb6f28000)
root@cubieboard2:/boxer#
ld-linux 有正确的去处,但其他的仍然在老路...
这是我之前使用 QT 编译的另一个程序,带有 rpath LDFLAG:
QMAKE_LFLAGS +=-Wl,-rpath,/boxer/lib -Wl,--dynamic-linker,/boxer/lib/ld-linux.so.3
是的,我关注了your answer它工作正常(谢谢,帮助很大 :-)),LD_TRACE_LOADED_OBJECTS=1
结果:
# LD_TRACE_LOADED_OBJECTS=1 /boxer/Boxer
libdl.so.2 => /boxer/lib/libdl.so.2 (0xb6efb000)
libQt5Widgets.so.5 => /boxer/lib/libQt5Widgets.so.5 (0xb69b9000)
libQt5Gui.so.5 => /boxer/lib/libQt5Gui.so.5 (0xb655f000)
libQt5Network.so.5 => /boxer/lib/libQt5Network.so.5 (0xb646f000)
libQt5Core.so.5 => /boxer/lib/libQt5Core.so.5 (0xb5f50000)
libpthread.so.0 => /boxer/lib/libpthread.so.0 (0xb5f27000)
libstdc++.so.6 => /boxer/lib/libstdc++.so.6 (0xb5ddc000)
libm.so.6 => /boxer/lib/libm.so.6 (0xb5d2a000)
libgcc_s.so.1 => /boxer/lib/libgcc_s.so.1 (0xb5cfa000)
libc.so.6 => /boxer/lib/libc.so.6 (0xb5bb5000)
/boxer/lib/ld-linux.so.3 (0xb6f0e000)
librt.so.1 => /boxer/lib/librt.so.1 (0xb5b9e000)
我们可以看到一切顺利,包括 libc,有什么不同?
最佳答案
GLIBC version is old ,./libc.so.6 shows it was compiled by gcc 4.6.3, unfortunately i can't find this old version on apt-get.
请注意,GLIBC 的版本很少与编译它的 GCC 版本有关。较新版本的 GLIBC 确实需要较新版本的 GCC 来构建它们,但这种关系远非一对一。
deployed the corresponding library to /boxer/lib,but the problem not solve,and ./ld-linux-armhf.so.3 --list shows that the ld was linked to correct place,but,as u can see below, the rest not.
您需要使用 --prefix=/boxer
构建 GLIBC,以便 ld-linux
在备用位置查找。另见 this answer .
更新:
我误解了你的问题。这个命令:
./ld-linux-armhf.so.3 --list /boxer/frida-server
不会告诉您您想知道的内容(哪些库将在运行时加载),因为它不会关注编译到应用程序中的RPATH
(它只使用编译到 ld-linux
本身的路径)。
相反,您想要:
LD_TRACE_LOADED_OBJECTS=1 /boxer/frida-server
它显示了实际上将加载哪些库。
关于c++ - glibc 版本早于 gcc 版本和 -Wl,-rpath 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45512958/
这个问题在这里已经有了答案: Multiple glibc libraries on a single host (11 个回答) 5年前关闭。 有没有办法在本地文件夹中安装新版本的 GLIBC?我将
这个问题在这里已经有了答案: Deploying Yesod to Heroku, can't build statically (4 个回答) 1年前关闭。 我有两台机器 RHEL 4机 RHEL
我在 C 启动时读取 article ,它指的是函数 __libc_csu_init 。谁能告诉我CSU代表什么? 最佳答案 我在 libc p 中找到了对“ C s tart u p”的引用。 这远
我正在使用 AlpineLinux(安装在我的计算机上,而不是安装在 docker 中)并且我正在尝试使用依赖于 glibc 的共享库。 由于 Glibc 没有集成到这个发行版中,我看到开发了一个替代
所以我正在玩 Alpine Linux,它使用 musl 与 glibc。 我发现由于这个选择,我无法运行 Oracle Java 或在 glibc 下构建的静态二进制文件。 musl 是否应该与更广
在构建 glibc 时,出现此错误。 *glibc/build/elf/dl-allobjs.os: file not recognized: File format not recognized c
我一直在寻找没有好的结果。 我想知道在文本中解释为 Malloc Maleficarum 或 Malloc Des-Malleficarum 的技术在 glibc 2.12.1 版本中是否有效。 在提
我在 CentOS 上安装 gcc 时遇到问题。 我的命令的输出sudo yum install gcc: Loaded plugins: fastestmirror Loading mirror s
我想下载gzip类型的mariadb,但是我发现它有很多文件可以下载,例如mariadb-10.2.6-linux-x86_64.tar.gz,mariadb-10.2.6-linux-glibc_2
我想尝试使用不同的 glibc 的 sin 函数。他们是否可以在不编译整个 glibc 的情况下使用不同 glibc 版本的 sin 函数? 我已经在我的虚拟 ubuntu 机器上下载了不同版本的 g
我要在超算中心的目录下安装一个软件,但是sudo,root,连apt-get,yum都不能用...这个软件需要glibc2.7,所以我得手动安装gcc和glibc(因为我无法更改内置 gcc 的路径来
我正在研究需要在多个不同的嵌入式平台上运行的 C 和 C++ 程序,为此我有交叉编译器,因此我可以在我的 x86 桌面上进行构建。 我在某些功能上遇到了一个可怕的问题,例如“strtod()”。这是我
我遇到了一个非常烦人的问题:我有一个程序,它在开始时创建一个线程,该线程将在执行期间启动其他内容(fork() 紧随其后的是 execve())。 这是我的程序达到(我认为)死锁时两个线程的 bt:
我刚刚发现,glibc 2.23 有一个关于 stdio 函数 fmemopen() 的错误,参见例如Using rewind() on a FILE* opened with fmemopen .
[root@localhost Keystone2]# sudo rpm -ivh glibc-2.3.4-2.9.audit.x86_64.rpm --nodeps --force warning:
从该系列中很容易找到如何使用 dlsym()和其他函数,但是在内部如何工作呢?是否可以编写自己的,容易实现的dlsym()? 我想知道是否有可能实现类似的行为,但在不将与-ldl链接的情况下实现(可以
嗨,我目前使用的是 ubuntu 9.10 和 glibc 版本 2.11.1-0,好吧,我正在做一个项目,我想用 glibc 的另一个版本(2.5-58)进行测试,我想知道以下与此相关的事情: 如何
我已经下载了glibc,这样我就可以修改它的代码然后使用它。所以只是为了玩玩它,我更改了 glibc 的 stdio-common 目录中的 printf 函数,以便它打印“你可以看到我吗?”。 in
我正在集群上的 conda 环境中部署 R 脚本。该脚本加载了一些需要 glibc 版本 >= 2.14 的包。虽然我的系统的 glibc 版本为 2.14,但集群的 glibc 版本为 2.12,我
所以。我有一个问题,我在一台机器上有两个版本的 GCC。 3.4.6 和 4.1 这是由于新软件的一些依赖性问题。 (需要 glibc 4.1) 当我将这个新软件与 4.1 库链接时,它链接得很好。但
我是一名优秀的程序员,十分优秀!