Chap ELF
readelf -h elf header
readelf -l program header 小文字のエル
readelf -S section header
readelf -x sectionの中身(番号で指定)
- section header情報取得
size -A hello.o
objdump -h hello.o
- section 情報取得
objdump -j
ex) .text .data .bss .rodata
readelf -x
- .text の逆assy
objdump -d hello.o
-nm コマンド ELFファイル内に含まれるシンボル(関数や変数)定義を出力するツール
通常、オブジェクトファイルにグローバルシンボル(大文字表示のもの)、ローカルシンボル(小文字表示のもの)も含まれて
いるが、リンクに必要なシンボルはグローバルシンボルのみ。
A Absolute B bss(block started R by Symbol Section) D data R readonly .rodata) T Text section (code) U Undefined inside file W Weak Symbol ? Undefined symbol inside ELF