ldd

ldd命令用于打印程序或者库文件所依赖的共享库列表

ldd不是一个可执行程序,而只是一个shell脚本

golang

go install -buildmode=shared std

go build -linkshared hi.go

Linux

ldd /usr/local/bin/openssl

linux-vdso.so.1 => (0x00007fffa4913000)

libssl.so.1.1 => /usr/local/lib/libssl.so.1.1 (0x00007fc0de4b5000)

libcrypto.so.1.1 => /usr/local/lib/libcrypto.so.1.1 (0x00007fc0ddfc5000)

libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc0ddda8000)

libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc0dd9de000)

libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc0dd7da000)

/lib64/ld-linux-x86-64.so.2 (0x00007fc0de748000)

Mac

otool -L /usr/local/opt/openssl/bin/openssl

/usr/local/Cellar/openssl/1.0.2r/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)

/usr/local/Cellar/openssl/1.0.2r/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)

LD_TRACE_LOADED_OBJECTS

export LD_TRACE_LOADED_OBJECTS=1

ls

linux-vdso.so.1 => (0x00007fffc83fd000)

libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f159e40e000)

libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f159e044000)

libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f159ddd4000)

libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f159dbd0000)

/lib64/ld-linux-x86-64.so.2 (0x00007f159e630000)

libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f159d9b3000)

objdump

objdump -s -j .interp `which openssl`

Contents of section .interp:

400238 2f6c6962 36342f6c 642d6c69 6e75782d /lib64/ld-linux-

400248 7838362d 36342e73 6f2e3200 x86-64.so.2.

################################

objdump -s -j .interp `which ls`

Contents of section .interp:

400238 2f6c6962 36342f6c 642d6c69 6e75782d /lib64/ld-linux-

400248 7838362d 36342e73 6f2e3200 x86-64.so.2.

readelf

readelf -x .interp `which openssl`

Hex dump of section '.interp':

0x00400238 2f6c6962 36342f6c 642d6c69 6e75782d /lib64/ld-linux-

0x00400248 7838362d 36342e73 6f2e3200 x86-64.so.2.

readelf -x .interp `which ls`

Hex dump of section '.interp':

0x00400238 2f6c6962 36342f6c 642d6c69 6e75782d /lib64/ld-linux-

0x00400248 7838362d 36342e73 6f2e3200 x86-64.so.2.

readelf -x .interp ./ckb-wallet-linux

Warning: Section '.interp' was not dumped because it does not exist!

readelf -d `which openssl`

Dynamic section at offset 0x94d88 contains 28 entries:

Tag Type Name/Value

0x0000000000000001 (NEEDED) Shared library: [libssl.so.1.1]

0x0000000000000001 (NEEDED) Shared library: [libcrypto.so.1.1]

0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]

0x0000000000000001 (NEEDED) Shared library: [libc.so.6]

0x000000000000001d (RUNPATH) Library runpath: [/usr/local/lib]

0x000000000000000c (INIT) 0x4171c8

0x000000000000000d (FINI) 0x46cc34

0x0000000000000019 (INIT_ARRAY) 0x6948e8

0x000000000000001b (INIT_ARRAYSZ) 8 (bytes)

0x000000000000001a (FINI_ARRAY) 0x6948f0

0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)

0x000000006ffffef5 (GNU_HASH) 0x400298

0x0000000000000005 (STRTAB) 0x408388

0x0000000000000006 (SYMTAB) 0x4003f0

0x000000000000000a (STRSZ) 25298 (bytes)

0x000000000000000b (SYMENT) 24 (bytes)

0x0000000000000015 (DEBUG) 0x0

0x0000000000000003 (PLTGOT) 0x695000

0x0000000000000002 (PLTRELSZ) 32328 (bytes)

0x0000000000000014 (PLTREL) RELA

0x0000000000000017 (JMPREL) 0x40f380

0x0000000000000007 (RELA) 0x40f200

0x0000000000000008 (RELASZ) 384 (bytes)

0x0000000000000009 (RELAENT) 24 (bytes)

0x000000006ffffffe (VERNEED) 0x40f100

0x000000006fffffff (VERNEEDNUM) 4

0x000000006ffffff0 (VERSYM) 0x40e65a

0x0000000000000000 (NULL) 0x0

参考:

ldd usr bin mysql_ldd与otool相关推荐

  1. ldd /usr/bin/mysql_mysql客户端登录时报mysql: relocation error错误

    在安装了xtrabackup后,再用下列命令登录时报下列错误 [root@localhost ~]# mysql -u root -p mysql: relocation error: mysql: ...

  2. 找不到ld-linux.so.3,usr/bin/ld: cannot find 错误解决方法和 /etc/ld.so.conf

    我makefile出现这个错误: HelloWorldServer.c:(.text+0xaa): undefined reference to `zmq_send' collect2: error: ...

  3. 误删usr/bin/bash后无法登录,抢救性修复

    近日突然发现,系统访问很卡,于是查看系统进程,发现有一个es用户占用了大量cpu 文章目录 1.使用top 查看cpu 使用情况 2.删除关联的bash 3.进入Rescue模式 4.使用chroot ...

  4. mac 下面 you have an outdated version of /usr/bin/install_name_tool installed

    我在macpro,系统版本10.10.1 ,安装composer的时候提示 you have an outdated version of /usr/bin/install_name_tool ins ...

  5. pip 升级之后提示 bash: /usr/bin/pip3: No such file or directory

    1. 问题现象 pip 升级之后使用时报错: $ pip3 -V bash: /usr/bin/pip3: No such file or directory 通过命令查找 pip 位置 $ whic ...

  6. Ubuntu18.04 误删/usr/bin/python3的解决方案

    Ubuntu18.04 误删/usr/bin/python3的解决方案 这应该是一个链接文件,Python.pip3等指令都会指向它,删除之后无法打开Python解释器我在误删之后 首先重新下载了Py ...

  7. Linux编译lclntsh,Linux下编译C/C++时,出现/usr/bin/ld: cannot find -l*** 错误的处理

    直接在命令行输入: # locate  lib*** 显示出文件所在路径, 然后在命令行: # ln -s 文件路径/文件名  /usr/lib/文件名 应该解决了. 例如: #  gcc first ...

  8. 【Mac】解决「无法将 chromedriver 移动到 /usr/bin 目录下」问题

    问题描述 在搭建 Selenium 库 + ChromeDriver 爬虫环境时,遇到了无法将 chromedriver 移动到 /usr/bin 目录下的问题,如下图: 一查原来是因为系统有一个 S ...

  9. make报错:/usr/bin/ld: cannot find -lXXX

    在编译php时报错如下: # make ... /usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status make: ** ...

  10. cp: /usr/bin/chromedriver: Operation not permitted

    Mac os 安装chromedriver碰到的问题 我想把从官网下载的文件chromedriver从下载文件夹转移到/usr/bin目录下 终端输入: appledeMBP:~ apple$ cd ...

最新文章

  1. 如果当前没有拿得出手的简历,也别慌,努力的话最多两年情况就能改变
  2. mysql 类似oracle,mysql – 制作类似于Oracle的seqences的机制
  3. 200721学习日报
  4. c# websocket 心跳重连_websocket的简单使用
  5. Java EE WEB工程师培训-JDBC+Servlet+JSP整合开发之12.Servlet基础(2)
  6. th:each嵌套_难题:嵌套的computeIfAbsent
  7. 信安教程第二版-第15章网络安全主动防御技术与应用
  8. 字典中文乱码怎么处理_CATIA教程技巧和二次开发宏:我的零件有很多的几何体,但是几何体的名称是乱的,还有乱码,影响我的后续操作,我该怎么处理?...
  9. 【操作系统】—线程概念和多线程模型
  10. 释放被束缚的页面 – V1.1.0
  11. 基于Chrome插件的微博超话自动签到
  12. 基于FFmpeg的Qt视频播放器
  13. D4.8 Write transactions
  14. MySQL Group Replication的RECOVERING状态深度理解
  15. 在fpga中用Cordic算法来产生正弦函数
  16. 关于抽烟、戒烟、或者说是收放自如
  17. 要求返回三位数中的水仙花数 ,数字范围在100-999中。(水仙花数:百位数的3次方+十位数的3次方+个位数的三次方=数字本身)
  18. C/C++在Java、Android和Objective-C三大平台下实现混合编程
  19. allegro如何等长走线
  20. python小明爱跑步

热门文章

  1. 11.6 通信实例与ASCII码
  2. 光谱共焦位移传感器原理
  3. vmplayer网络配置详解
  4. 磁盘串口和并口的区别
  5. 证件照处理软件(IDPhoto Processor)免费版 v3.2.10
  6. java图书馆借书问题_图书馆借书系统-Java异常的学习和处理
  7. 一元购java源码下载_yungoucms - 源码下载|行业应用软件|其他行业|源代码 - 源码中国...
  8. 常用的网站压力测试工具有哪些
  9. 这届打工人,回家过年都这么难
  10. php 数组添加键值对,php 给数组增加键值对