检查是否使用"-static"编译的二进制文件是否存在. [英] checking if a binary compiled with "-static"

查看:86
本文介绍了检查是否使用"-static"编译的二进制文件是否存在.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Linux中有一个二进制文件.如何检查它是否已使用"-static"进行编译?

I have a binary file in linux. How can I check whether it has been compiled with "-static" or not?

推荐答案

ldd /path/to/binary如果二进制文件是静态编译的,则不应列出任何共享库.

ldd /path/to/binary should not list any shared libraries if the binary is statically compiled.

这篇关于检查是否使用"-static"编译的二进制文件是否存在.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆