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 ...
随机推荐
- RESTful API设计方法
1.如果已经开始逐步的接触到了RESTful API设计方法的朋友,首先要对HTTP/HTTPS有一个大致的了解,虽然本身和RESTful API没有什么关系.但是对于增加网站的安全性还是十分重要的, ...
- php 流
php:// — 访问各个输入/输出流(I/O streams) 说明 PHP 提供了一些杂项输入/输出(IO)流,允许访问 PHP 的输入输出流.标准输入输出和错误描述符, 内存中.磁盘备份的临时文 ...
- js操作url参数
function getQueStr(url, ref) //获取参数值 { var str = url.substr(url.indexOf('?') + 1); if (str.indexOf(' ...
- HDU1846 - Brave Game【巴什博弈】
十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫<勇敢者的游戏>(英文名称:Zathura),一直到现在,我依然对于电影中的部分电脑特技印象深刻. 今天,大家选 ...
- MVC基于Struts2的CRUD,java+bean+struts
1,所需jar包,将jar包导入lib中 2,项目目录结构 3,struts.xml <?xml version="1.0" encoding="UTF-8&quo ...
- C/C++ 获取文件夹下的所有文件列表
本系列文章由 @yhl_leo 出品,转载请注明出处. 文章链接: http://blog.csdn.net/yhl_leo/article/details/51009608 提供一段C/C++代码示 ...
- Fiddler 无法监测WCF通信疑问
别人的可以检测到通信,我的为什么不行呢? 使用的是basicHttp协议,应该可以的啊,着的是非常奇怪
- [SharePoint][SharePoint Designer 入门经典]Chapter13 客户端Silverlight编程
1.使用Silverlight,CAML和Linq取得数据 2.编程性创建更新删除列表数据项 3.修饰列表和库的配置 4.管理文件和文件夹 5.修改快速启动和顶部导航条 [使用Silverlight, ...
- [React Router] Create a ProtectedRoute Component in React Router (setState callback to force update)
In this lesson we'll create a protected route just for logged in users. We'll combine a Route with a ...
- HDU 4268 Alice and Bob(贪心+Multiset的应用)
题意: Alice和Bob有n个长方形,有长度和宽度,一个矩形能够覆盖还有一个矩形的条件的是,本身长度大于等于还有一个矩形,且宽度大于等于还有一个矩形.矩形不可旋转.问你Alice最多能覆盖Bo ...