i.e. readelf -S a.out
output:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .interp PROGBITS 08048114 000114 000013 00 A 0 0 1
[ 2] .note.ABI-tag NOTE 08048128 000128 000020 00 A 0 0 4
[ 3] .hash HASH 08048148 000148 000028 04 A 5 0 4
[ 4] .gnu.hash GNU_HASH 08048170 000170 000020 04 A 5 0 4
[ 5] .dynsym DYNSYM 08048190 000190 000050 10 A 6 1 4
[ 6] .dynstr STRTAB 080481e0 0001e0 00004a 00 A 0 0 1
[ 7] .gnu.version VERSYM 0804822a 00022a 00000a 02 A 5 0 2
[ 8] .gnu.version_r VERNEED 08048234 000234 000020 00 A 6 1 4
[ 9] .rel.dyn REL 08048254 000254 000008 08 A 5 0 4
[10] .rel.plt REL 0804825c 00025c 000018 08 A 5 12 4
[28] .debug_info PROGBITS 00000000 00071d 0001a7 00 0 0 1
我想要有
([Nr])(Name)(Type)(Addr)(Off)(Size)(ES)(Flg)(Lk)(Inf)(Al)
請問要怎麼parse呢?
謝謝