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 ...
随机推荐
- java中String和int的互相转化
1. String 转 int 方式1:Integer.parseInt(); 方式2: Integer.valueOf(myStr).intValue(); 2. int 转String 方式1: ...
- python之parameterized模块
parameterized扩展了py.test参数化测试,unittest参数化测试. <1>一个小练习 import unittest import math @parameterize ...
- 不能使用一般 Request 集合
request.querystring("id"),不能request("id")
- nyoj212-k尾相等数
212-K尾相等数 内存限制:64MB时间限制:3000msSpecial Judge: No accepted:0submit:0 题目描述: 输入一个自然数K(K>1),如果存在自然数M和N ...
- ASP.NET MVC5 :Attribute路由使用详解
1.什么是Attribute路由?怎么样启用Attribute路由? 微软在 ASP.NET MVC5 中引入了一种新型路由:Attribute路由,顾名思义,Attribute路由是通过Attrib ...
- J2EE异常问题总结
http://blog.csdn.net/rchm8519/article/details/41624381 http://www.51testing.com/html/49/240349-14393 ...
- 2018 MAC下安装Redis和Redis可视化工具RDM并连接Redis
实验环境:一台mac V:10.13.6 一.安装redis brew install redis 二.安装RDM 直接下载安装rdm dmg文件 链接: https://pan.baidu.com/ ...
- hdu 4079简单贪心
#include<stdio.h> #include<string.h> #define ll __int64 #define N 11000 struct node { in ...
- BA--关于江森的学习笔记
机房功率密度:“每机架”功耗 数据中心效率:平均 PUE 2.5,百度是1.36,苹果是1.06 绿色数据中心:PUE<1.58 机房环境:空气质量,配电,UPS,空气处理系统,发电机,江森OD ...
- xcodeproj cannot be opened because the project file cannot be parsed.
解决方法: 1.对.xcodeproj文件右键,显示包内容 2.双击打开 project.pbxproj 文件 3.找到以上类似的冲突信息(能够用commad + f搜索) 4.删除<&l ...