linux常用工具

man:(very useful)

规则: man 章节号 名称

章节1:命令;章节2:系统调用函数; 章节3:库函数

objdump

描述:objdump displays information about one or more object files. The options control what particular information to display.This information is mostly useful to programmers who are working on the compilation tools, as opposed to programmers who just want their program to compile and work. objfile... are the object files to be examined. When you specify archives, objdump shows information on each of the member object files.

用法:objdump [选项](至少一个) 目标文件

例:objdump -x objfile  

以某种分类信息的形式把目标文件的数据组织(被分为几大块)输出 <可查到该文件的所有动态库>   

nm
描述:GNU nm lists the symbols from object files objfile.... If no object files are listed as arguments, nm assumes the file a.out.

用法:nm [选项] 目标文件

例: nm -D(--dynamic) objfile

Display the dynamic symbols rather than the normal symbols. This is only meaningful for dynamic objects, such as certain types of shared libraries.

ranlib

strip
移除所有的符号信息

objcopy

file

作用:查看文件类型

用法:file   [filename]

readelf

作用: Displays information about one or more ELF format object files.(包括库文件)

用法:readelf   [options]    [filename]

options:

-d:Displays the contents of the file's dynamic section, if it has one.

-s:Displays the entries in symbol table section of the file, if it has one.

grep

用法:grep [options] [pattern] [files]

options:

-n:打印包含匹配项的行和行标

-i:忽略大小写

-r:明确要求搜索子目录

-d skip:忽略子目录 

pattern:

正则表达式表示的匹配字符串

files:

欲搜索文件   

原文地址:https://www.cnblogs.com/bettercoder/p/3370967.html