ELF中SHT_NULL节的用途是什么? [英] What is the use of the SHT_NULL section in ELF?

查看:292
本文介绍了ELF中SHT_NULL节的用途是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. ELF 中的 SHT_NULL 部分的目的是什么?

  2. 是操作系统还是加载程序引用的?

  3. 此部分的大小是什么?

  4. 可以吗?与 NULL 指针有什么关系?

  5. 此外,为什么本节在节段映射中没有条目?

  1. What is the purpose of the SHT_NULL section in ELF?
  2. Is it referenced by the OS or the loader?
  3. What is the size of this section?
  4. Does it have anything to do with the NULL pointer ?
  5. 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 输出)[但请参见下文]。

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆