最終更新:2019-10-06 (日) 12:21:07 (1626d)
readelf
Top / readelf
ELFファイルの中身を表示する
Displays information about ELF files.
概要
- readelfは1つ以上のELFフォーマットオブジェクトファイルに関する情報を表示します。オプションでどの情報を表示するかを制御します。
- 32ビットELFおよび64ビットELFをサポートしています。 また、ELFファイルを含むアーカイブもサポートしています。
- このプログラムは objdump と似た機能を持っていますが、こちらの方がより詳細に分け入りますし、BFDライブラリと 独立に存在しています。 ですから、BFDにバグがあってもreadelfには影響はありません。
オプション
readelf -a? all, Equivalent to: -h -l -S -s -r -d -V -A -I readelf -h? Display the ELF file header ELFヘッダ readelf -l Display the program headers ELF/プログラムヘッダテーブル readelf -S Display the sections' header ELF/セクションヘッダテーブル readelf -s Display the symbol table .dynsym, .symtab readelf -d Display the dynamic section .dynamic
help
使用法: readelf <option(s)> elf-file(s) ELF 形式のファイルの内容に関する情報を表示します Options are: -a --all Equivalent to: -h -l -S -s -r -d -V -A -I -h --file-header Display the ELF file header -l --program-headers Display the program headers --segments An alias for --program-headers -S --section-headers Display the sections' header --sections An alias for --section-headers -g --section-groups Display the section groups -t --section-details Display the section details -e --headers Equivalent to: -h -l -S -s --syms Display the symbol table --symbols An alias for --syms --dyn-syms Display the dynamic symbol table -n --notes Display the core notes (if present) -r --relocs Display the relocations (if present) -u --unwind Display the unwind info (if present) -d --dynamic Display the dynamic section (if present) -V --version-info Display the version sections (if present) -A --arch-specific Display architecture specific information (if any) -c --archive-index Display the symbol/file index in an archive -D --use-dynamic Use the dynamic section info when displaying symbols -x --hex-dump=<number|name> Dump the contents of section <number|name> as bytes -p --string-dump=<number|name> Dump the contents of section <number|name> as strings -R --relocated-dump=<number|name> Dump the contents of section <number|name> as relocated bytes -w[lLiaprmfFsoRt] or --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames, =frames-interp,=str,=loc,=Ranges,=pubtypes, =gdb_index,=trace_info,=trace_abbrev,=trace_aranges, =addr,=cu_index] Display the contents of DWARF2 debug sections --dwarf-depth=N N 以上の深さの DIE を表示しない --dwarf-start=N N 以上の深さの DIE を表示する -I --histogram Display histogram of bucket list lengths -W --wide 出力幅が 80 文字を超えることを許可する @<file> オプションを <file> から読み込む -H --help この情報を表示する -v --version readelf のバージョン番号を表示する
メモ
- readelf -sで.aの中の.oのシンボル一覧を表示できる