今天在帮同事查看一个问题时, 需要用到ldd, 于是就顺便看了一下ldd的实现. 好在ldd本身只是一个脚本, 而不是executable, 可以直接查看实现的代码. 根据注释: 21 # This is the `ldd' command, which lists what shared libraries are 22 # used by given dynamically-linked executables. It works by invoking the 23 # run-time…