ELF中SHT_NULL节的用途是什么? [英] What is the use of the SHT_NULL section in ELF?
问题描述
-
ELF
中的SHT_NULL
部分的目的是什么? - 是操作系统还是加载程序引用的?
- 此部分的大小是什么?
- 可以吗?与 NULL 指针有什么关系?
- 此外,为什么本节在节段映射中没有条目?
- What is the purpose of the
SHT_NULL
section inELF
? - Is it referenced by the OS or the loader?
- What is the size of this section?
- Does it have anything to do with the NULL pointer ?
- Additionally, why does this section not have an entry in the section-segments mapping?
根据ELF规范:
SHT_NULL
:此值标记节标题为无效;它没有关联的部分。该节标题的其他成员具有未定义的值。
SHT_NULL
: This value marks the section header as inactive; it does not have an associated section. Other members of the section header have undefined values.
推荐答案
目的是什么elf中的SHT_NULL部分?
What is the purpose of the SHT_NULL section in elf?
它用作前哨。
它是由操作系统还是加载程序引用的?> p>
Is it referenced by the operating system or the loader?
否。
此部分?
What is the size of this section ?
零(您可以在 readelf -WS a.out $ c $中看到它c>输出)[但请参见下文]。
Zero (you can see that in readelf -WS a.out
output) [but see below].
为什么本节在节段映射中没有条目?
why does this section not have an entry in the section-segments mapping ?
因为该段不在任何段中。
Because that section is not present in any segment.
通常,每个ELF文件的第一部分是 SHT_NULL
类型。从理论上讲,后链接工具也可以将其他部分的类型设置为 SHT_NULL
(例如,如果不再需要其数据) ,并且所有后续工具都应该忽略该部分。这并不常见。
Normally, the very first section in every ELF file is of type SHT_NULL
. In theory, a post-link tool may set the type of some other section to SHT_NULL
as well (e.g. if its data is no longer needed), and all subsequent tools are supposed to ignore that section. This is not common.
这篇关于ELF中SHT_NULL节的用途是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!