ldd 命令 libasan 未显示
我的开发机器中有一个二进制文件 ldd 命令不显示 libasan。但是当我将相同的二进制文件复制到另一台生产机器时。 ldd 命令显示 libasan。我不确定这是怎么发生的。请帮我。
## DEV VM ##
cohesity - main: ldd <path> | grep -i asan
cohesity - main: md5sum <path>
11152b37c616555eed06800ee499323a <path>
### Production machine ##
[support@suresh-test-005056af8cb9-node-1 ~]$ md5sum <path>
11152b37c616555eed06800ee499323a <path>
[support@suresh-test-005056af8cb9-node-1 ~]$ ldd <path> | grep -i asan
libasan.so.4 => <path to libasan> (0x00007f72595e7000)
[support@suresh-test-005056af8cb9-node-1 ~]$
I have a binary in my dev machine ldd command doesn't show libasan. But when I copy the same binary to another production machine. ldd command shows libasan. I am not sure How this happens. Please help me.
## DEV VM ##
cohesity - main: ldd <path> | grep -i asan
cohesity - main: md5sum <path>
11152b37c616555eed06800ee499323a <path>
### Production machine ##
[support@suresh-test-005056af8cb9-node-1 ~]$ md5sum <path>
11152b37c616555eed06800ee499323a <path>
[support@suresh-test-005056af8cb9-node-1 ~]$ ldd <path> | grep -i asan
libasan.so.4 => <path to libasan> (0x00007f72595e7000)
[support@suresh-test-005056af8cb9-node-1 ~]$
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ldd 命令输出取决于以下几项:
通过将主二进制文件复制到另一台机器,您只能保证“步骤 1”是相同的。
很可能“步骤 2”中的共享库之一是在
node-1
上使用-fsanitize=address
构建的,但不是在“dev VM”中构建的。您可以使用 readelf -d /path/to/foo.so | 找出哪个库。 grep NEEDED.*libasan.so.4 在 ldd 输出中的每个库上。
The
ldd
command output depends on a few things:preload
libraries, etc.)By copying the main binary to a different machine, you only guaranteed that "step 1" is identical.
Chances are that one of the shared libraries in "step 2" has been built with
-fsanitize=address
onnode-1
, but not in "dev VM".You can find out which library that is by using
readelf -d /path/to/foo.so | grep NEEDED.*libasan.so.4
on each of the libraries inldd
output.