LD_DEUBG 调试动态库加载
我們知道ldd開查看程序依賴的 動態(tài)庫 已經(jīng) 為解決的符號。但運行時加載過程去沒有辦法知道。這就需要用到LD_DEBUG
?
LD_DEBUG 是 glibc 的 loader 為了調(diào)試而設置的一個環(huán)境變量。
通過設置這個環(huán)境變量,可以調(diào)試動態(tài)庫的 加載過程。
設置 LD_DEBUG 環(huán)境變量獲得更多信息:
$ LD_DEBUG=help ls
Valid options for the LD_DEBUG environment variable are:
libs??????? display library search paths
reloc?????? display relocation processing
files?????? display progress for input file
symbols???? display symbol table processing
bindings??? display information about symbol binding
versions??? display version dependencies
all???????? all previous options combined
statistics? display relocation statistics
unused????? determined unused DSOs
help??????? display this help message and exit
To direct the debugging output into a file instead of standard output
a filename can be specified using the LD_DEBUG_OUTPUT environment variable.
轉載于:https://www.cnblogs.com/napoleon_liu/archive/2011/02/16/1956400.html
總結
以上是生活随笔為你收集整理的LD_DEUBG 调试动态库加载的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ORACLE查询闪回
- 下一篇: DIV滚动条大全