Chinaunix首页 | 论坛 | 博客
  • 博客访问: 318847
  • 博文数量: 43
  • 博客积分: 1044
  • 博客等级: 准尉
  • 技术积分: 658
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-20 14:56
个人简介

人法地,地法天,天法道,道法自然。

文章分类

全部博文(43)

文章存档

2019年(1)

2013年(3)

2012年(15)

2011年(24)

分类: LINUX

2011-03-15 19:35:24

nm命令,用来列出一个目标文件中的各种符号。如:函数名,全局变量名。(linux,solaris,HP)
ar命令,可以用来创建,修改库。也可以从库中提出单个模块。
what命令,
ident命令,
ldd命令,查看ELF的连接库的命令
file命令,查看文件类型的命令
coreadm命令

strace命令,跟踪进程的系统调用。linux
truss命令,可以得到一个进程的系统调用跟踪信息。 solaris
ktrace,kdump命令,跟踪进程的系统调用。freeBSD和OS X
tusc命令,跟踪进程的系统调用,HP(非HP自带命令,需要安装)

pstack命令,打印core文件堆棧信息。solaris
strip命令,去掉ELF中的調試信息 solaris,HP,Linux

string命令,將二進制文件中的所有字符串打印出來。linux,solaris
od命令,將一個文件按一定的方式輸出。linux

astyle用于整理代码的格式。很有用
vim中使用gg=G也可以整理代码格式。


更多請參考Binutils。


The GNU Binutils are a collection of binary tools. The main ones are:

  • ld - the GNU linker.
  • as - the GNU assembler.

But they also include:

  • addr2line - Converts addresses into filenames and line numbers.
  • ar - A utility for creating, modifying and extracting from archives.
  • c++filt - Filter to demangle encoded C++ symbols.
  • dlltool - Creates files for building and using DLLs.
  • gold - A new, faster, ELF only linker, still in beta test.
  • gprof - Displays profiling information.
  • nlmconv - Converts object code into an NLM.
  • nm - Lists symbols from object files.
  • objcopy - Copys and translates object files.
  • objdump - Displays information from object files.
  • ranlib - Generates an index to the contents of an archive.
  • readelf - Displays information from any ELF format object file.
  • size - Lists the section sizes of an object or archive file.
  • strings - Lists printable strings from files.
  • strip - Discards symbols.
  • windmc - A Windows compatible message compiler.
  • windres - A compiler for Windows resource files.

Most of these programs use BFD, the Binary File Descriptor library, to do low-level manipulation. Many of them also use the opcodes library to assemble and disassemble machine instructions.

The binutils have been ported to most major Unix variants as well as Wintel systems, and their main reason for existence is to give the (and ) the facility to compile and link programs.


阅读(1937) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~