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 ...
随机推荐
- Zepto.js 源码解析(emoji版)
graph LR A($) --- B(function) A($) --- C(zepto) A($) --- D(fn) C(zepto) --- CA(init) C(zepto) --- CB ...
- Linux设备驱动--块设备(三)之程序设计(转)
http://blog.csdn.net/jianchi88/article/details/7212701 块设备驱动注册与注销 块设备驱动中的第1个工作通常是注册它们自己到内核,完成这个任务的函数 ...
- 1.1 Eclipse的安装
下载地址:http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigosr1 2.java jdk 的 ...
- BA-水阀接线(图)
220V水阀接线
- Codeforces Round #464 (Div. 2)
A. Love Triangle time limit per test: 1 second memory limit per test: 256 megabytes input: standard ...
- 《Python 源码阅读》之 类型Type
py一切皆对象: 那么Type也是个对象.对象类型叫PyTypeObject demo >>> a = 1 >>> a 1 >>> type(a) ...
- 去哪网实习总结:如何配置数据库连接(JavaWeb)
本来是以做数据挖掘的目的进去哪网的,结构却成了系统开发.. . 只是还是比較认真的做了三个月,老师非常认同我的工作态度和成果. .. 实习立即就要结束了.总结一下几点之前没有注意过的变成习惯和问题,分 ...
- UVA - 1642 Magical GCD 数学
Magical GCD The Magical GCD of a nonempty sequence of positive integer ...
- 造个简单的轮子倒是不难,但可用性健壮性高到qt这样全世界都在用,就几乎不可能了
造个简单的轮子倒是不难,但可用性健壮性高到qt这样全世界都在用,就几乎不可能了比如自己写个事件循环实现信号槽,还真不难,我这边的架构里就这么搞了个仿osgi的事件总线嵌入式实时操作系统上能用的大型gu ...
- hmm CDN检测
# -*- coding:utf-8 -*- import sys import re from hmmlearn import hmm import numpy as np from sklearn ...