美文网首页
Linux查看库信息

Linux查看库信息

作者: WB莫遥燚 | 来源:发表于2016-12-24 17:16 被阅读38次

ar : 创建静态库,插入,删除,列出和提取成员

strings : 列出文件中的所有可打印字符串

strip : 从目标文件中删除符号表信息

nm : 列出目标文件中符号表中定义的符号

size : 列出目标文件中节的名字和大小

ldd

列出可执行文件和动态库所依赖的动态库信息。

DESCRIPTION

ldd prints the shared libraries required by each program or shared library specified on the command line.

readelf

列出ELF格式文件的信息。readelf 后面必须跟参数,参数控制要显示的内容。readelf功能与objdump相似,且其不依赖BFD库。

ELF文件的格式参考http://vaqeteart.iteye.com/blog/1118753

DESCRIPTION

      readelf displays information about one or more ELF format object files.  The options control what particular information to display.

      elffile... are the object files to be examined.  32-bit and 64-bit ELF files are supported, as are archives containing ELF files.

      This program performs a similar function to objdump but it goes into more detail and it exists independently of the BFD library, so

      if there is a bug in BFD then readelf will not be affected.

options (我常用的options做了中文解释,信息很多没有看懂几个,哈哈!!)

SYNOPSIS

      readelf [-a|--all]

              [-h|--file-header]

              [-l|--program-headers|--segments]

              [-S|--section-headers|--sections]

              [-g|--section-groups]

              [-t|--section-details]

              [-e|--headers]

              [-s|--syms|--symbols]   ------------ 文件的符号

              [-n|--notes]

              [-r|--relocs]

              [-u|--unwind]

              [-d|--dynamic]               ------------ 文件依赖的动态库信息

              [-V|--version-info]

              [-A|--arch-specific]

              [-D|--use-dynamic]

              [-x |--hex-dump=]

              [-p |--string-dump=]

              [-R |--relocated-dump=]

              [-c|--archive-index]

              [-w[lLiaprmfFsoR]|

               --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]]

              [-I|-histogram]

              [-v|--version]

              [-W|--wide]

              [-H|--help]

objdump  与readelf功能相似。objdump : 所有二进制工具之母。能够显示一个目标文件中的所有信息,它最有用的功能是反汇编.text节中的二进制指令

DESCRIPTION

      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.

SYNOPSIS

      objdump [-a|--archive-headers]

              [-b bfdname|--target=bfdname]

              [-C|--demangle[=style] ]

              [-d|--disassemble]

              [-D|--disassemble-all]

              [-z|--disassemble-zeroes]

              [-EB|-EL|--endian={big | little }]

              [-f|--file-headers]

              [-F|--file-offsets]

              [--file-start-context]

              [-g|--debugging]

              [-e|--debugging-tags]

              [-h|--section-headers|--headers]

              [-i|--info]

              [-j section|--section=section]                --------------------- 指定某段信息

              [-l|--line-numbers]

              [-S|--source]

              [-m machine|--architecture=machine]

              [-M options|--disassembler-options=options]

              [-p|--private-headers]

              [-r|--reloc]

              [-R|--dynamic-reloc]

              [-s|--full-contents]

              [-W[lLiaprmfFsoR]|

               --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]]

              [-G|--stabs]

              [-t|--syms]                                                ---------------------- 符号信息

              [-T|--dynamic-syms]

              [-x|--all-headers]

              [-w|--wide]

 [--stop-address=address]

 [--start-address=address]

              [--prefix-addresses]

              [--[no-]show-raw-insn]

              [--adjust-vma=offset]

              [--special-syms]

              [--prefix=prefix]

              [--prefix-strip=level]

              [--insn-width=width]

              [-V|--version]

              [-H|--help]

              objfile...

常用选项:

反汇编

# objdump  -j .text -S  objfile

原文网址:

http://m.blog.csdn.net/article/details?id=6862787

相关文章

  • Linux查看库信息

    ar : 创建静态库,插入,删除,列出和提取成员 strings : 列出文件中的所有可打印字符串 strip :...

  • Linux命令集合

    查看Linux版本信息 查看Linux信息 添加Linux新用户

  • Linux c gcc相关

    linux下动态库文件名命名规则 libxxx.so 动态库的制作 ldd 查看可执行程序连接信息

  • 查看Linux 信息

    查看cpucat /proc/cpuinfo查看内存信息free查看磁盘信息fdisk -ldf -hl

  • 开发前准备

    [Linux查看GPU信息和使用情况] Linux查看显卡信息: 使用nvidia GPU可以: windows下...

  • SQL Server数据库日常维护命令与脚本

    1. 查看数据库信息 查看数据库服务器名称 查看数据库实例名称 查看数据库版本号 查看数据库实例 查看排序规则信息...

  • (二)数据库操作

    查看当前数据库: 显示当前时间、用户名、数据库版本 创建库 查看已有库 查看当前库信息 修改库的选项信息 删除库

  • 树莓派查看opencv版本

    1.查看linux下的opencv安装库: 2.查看linux下的opencv安装版本: 3.查看linux下的o...

  • 查看CPU信息与管理处理器的亲和性

    Linux下查看CPU相关信息 CPU的信息主要都在/proc/cupinfo中 Linux查看某个进程运行在哪个...

  • Linux查看系统基本信息

    Linux下如何查看版本信息, 包括位数、版本信息以及CPU内核信息、CPU具体型号一、查看Linux内核版本命令...

网友评论

      本文标题:Linux查看库信息

      本文链接:https://www.haomeiwen.com/subject/qrtrvttx.html