LoginSignup
0
0

More than 5 years have passed since last update.

elf / elfsharp > シンボル文字列テーブルの場所 > .strtab

Last updated at Posted at 2015-08-22

elfsharpを元にsymbolの読込みは成功した。

問題はシンボル文字列テーブルがどこにあるかということ。

http://softwaretechnique.jp/OS_Development/Tips/ELF/elf01.html
によると

.strtab
このセクションは文字列が格納されています。 だいたいの共通文字列はシンボルテーブルエントリーに関連する名前となります。 オブジェクトファイルにシンボル文字列テーブルが格納されているローダブルセグメント がある場合、そのセクションの属性はSHF_ALLOC ビットが1となり、その他のビットは0となります。

とある。

$ readelf -S Test.elf
There are 21 section headers, starting at offset 0x24b58c:
Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 2047d0 000000 00      0   0  4
  [ 1] .shstrtab         STRTAB          00000000 2047d0 0000ed 00      0   0  4
  [ 2] .strtab           STRTAB          00000000 2048c0 016a79 00      0   0  4
  [ 3] .symtab           SYMTAB          00000000 21b33c 030230 10      2 10822  4

とあり、.strtabにシンボル文字列テーブルが入っているようだ。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0