在readelf -S
的输出中,我想知道列标题ES
,Lk
,Inf
和Al
是什么意思。
例如:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .text PROGBITS 00000000 000034 00000d 00 AX 0 0 4
[ 2] .rel.text REL 00000000 000394 000008 08 10 1 4
[ 3] .data PROGBITS 00000000 000044 000000 00 WA 0 0 4
[...]
答案 0 :(得分:5)
我想知道列标题ES,Lk,Inf和Al
是什么
查看/usr/include/elf.h,了解Elf32_Shdr的定义。你会看到这样的事情:
typedef struct
{
Elf32_Word sh_name; /* Section name (string tbl index) */
Elf32_Word sh_type; /* Section type */
Elf32_Word sh_flags; /* Section flags */
Elf32_Addr sh_addr; /* Section virtual addr at execution */
Elf32_Off sh_offset; /* Section file offset */
Elf32_Word sh_size; /* Section size in bytes */
Elf32_Word sh_link; /* Link to another section */
Elf32_Word sh_info; /* Additional section information */
Elf32_Word sh_addralign; /* Section alignment */
Elf32_Word sh_entsize; /* Entry size if section holds table */
} Elf32_Shdr;
所以,一个合理的猜测是:ES
== sh_entsize
,Lk
== sh_link
,Inf
== sh_info
和Al
== sh_addalign
。