一 ELF的.strtab section
1 readelf -x 10 add.o
[root@localhost 0401]# readelf -x 10 add.o
Hex dump of section '.strtab':
0x00000000 00616464 2e637070 00726573 756c7400 .add.cpp.result.
0x00000010 5f5a3361 64646969 00 _Z3addii.
上面是以16进制方式显示指定段内内容。0x00 0x61 0x64 0x64对应''、'a'、'd'、'd'
2 realelf -S add.o
[root@localhost 0401]# readelf -S add.o
There are 11 section headers, starting at offset 0x240:
Section Headers:
[Nr] Name Type Address Offset Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0
[ 1] .text PROGBITS 0000000000000000 00000040 0000000000000014 0000000000000000 AX 0 0 1
[ 2] .data