LD_DEBUG
LD_DEBUG 是 glibc 中的 loader 为了方便自身调试而设置的一个环境变量。通过设置这个环境变量,可以方便的看到 loader 的加载过程。
LD_DEBUG=help ./main
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.
用法 root@wshn$LD_DEBUG=libs ./main
4452:
find library=libc.so.6 [0]; searching
4452: search cache=/etc/ld.so.cache
4452: trying file=/lib/i386-Linux-gnu/libc.so.6
4452:
4452:
4452: calling init: /lib/i386-linux-gnu/libc.so.6
4452:
4452:
4452: initialize program: ./main
4452:
4452:
4452: transferring control: ./main
4452:
Hello
4452:
4452: calling fini: ./main [0]
4452:
4452:
4452: calling fini: /lib/i386-linux-gnu/libc.so.6 [0]
4452:
LD_DEBUG的可选参数在help里面可以看见其复用形式
LD_DEBUG=libs,symbols ./main
输出log保存可以使用LD_DEBUG=all LD_DEBUG_OUTPUT=log ./main 会生成一个output指定文件名加进程号结尾的文件
LD_DEBUG的更多相关文章
- c高级编程4 LD_DEBUG
[root@monitor ~]# LD_DEBUG=help ls Valid options for the LD_DEBUG environment variable are: libs dis ...
- 关于LD_DEBUG (转载)
引用 LD_DEBUGThe dynamic library loader used in linux (part of glibc) has some neat tricks. One of the ...
- ModelSim Simulation of RapidIO II IP Core Demonstration Testbench May Require ld_debug Command
Solution ID: fb83262Last Modified: May 17, 2013Product Category: Intellectual PropertyProduct Area: ...
- Linux下memcache的安装和启动
memcache是高性能,分布式的内存对象缓存系统,用于在动态应用中减少数据库负载,提升访问速度.据说官方所说,其用户包括twitter.digg.flickr等,都是些互联网大腕呀.目前用memca ...
- [原创]Centos7 从零整合LNMP一体包
按照前几章配置好后,我们就可以把这些工具打包啦.生成LNMP一体包. # export LD_LIBRARY_PATH=/package/libmemcached/lib:$LD_LIBRARY_PA ...
- linux下memcached安装以及启动
1. 准备安装文件 下载memcached与libevent的安装文件 http://memcached.googlecode.com/files/memcached-1.4.15.tar.gz(me ...
- memcached服务器
memcached是高性能的分布式内存缓存服务器,通过缓存数据库查询结果,减少数据库访问次数,提高动态web应用的速度和可扩展性.为了提高性能,memcached把数据存储在内存中,重启memcach ...
- 【转】Memcached安装
解析:Memcached是什么? Memcached是由Danga Interactive开发的,高性能的,分布式的内存对象缓存系统,用于在动态应用中减少数据库负载,提升访问速度. 一.软件版本 ...
- 【转】error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
错误信息: /usr/local/memcacheq/bin/memcacheq: error while loading shared libraries: libevent-2.0.so.5: c ...
随机推荐
- Python 从入门到实践 - Web应用程序
一.创建项目 1.建立虚拟环境 python -m venv ll_env # 出现ll_env文件夹 2.激活虚拟环境 source ll_env/bin/activate # 要停止使用虚拟环境, ...
- Elasticsearch 入门 - Modifying Your Data
index/update/delete 均有大概1秒的缓存时间 Indexing/Replacing Documents curl -X PUT "localhost:9200/custom ...
- 【ACM-ICPC 2018 南京赛区网络预赛 A】An Olympian Math Problem
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 估计试几个就会发现答案总是n-1吧. 队友给的证明 [代码] #include <bits/stdc++.h> #def ...
- DOM中元素节点,属性节点,文本节点的理解
节点信息 每个节点都拥有包含着关于节点某些信息的属性.这些属性是: nodeName(节点名称) nodeValue(节点值) nodeType(节点类型) nodeType nodeType 属性可 ...
- BZOJ 3674 可持久化并查集加强版(按秩合并版本)
/* bzoj 3674: 可持久化并查集加强版 http://www.lydsy.com/JudgeOnline/problem.php?id=3674 用可持久化线段树维护可持久化数组从而实现可持 ...
- android 九宫格(16宫格)控件
public class NineRectView extends ViewGroup { private Context ctx; private int wSize,hSize,row,colum ...
- JSP页面标签
1.EL表达式中empty的用法 EL表达式中empty的用法 <c:if test="${! empty key}">${key}</c:if> < ...
- 2016.03.04,英语,《Vocabulary Builder》Unit 04
vor: 来自拉丁动词vorare,指to eat,-ivorous指吃某种食物的eater.carn肉,肉欲+vore吃→吃肉的:carnival狂欢节,谢肉节voracious a 狼吞虎咽的(v ...
- 2016.03.02,英语,《Vocabulary Builder》Unit 03
ambi/amphi: 指on both sides或者around的意思,ambi-来自拉丁语,amphi-来自希腊语.ambidextrous:[ˌæmbi'dekstrəs] adj. 两手俱利 ...
- gridview in webform
How to: Enable Default Paging in the GridView Web Server Control https://msdn.microsoft.com/en-us/li ...