段边界内的任何数据,但超出段范围 [英] Any data within segment boundaries however out of section

查看:68
本文介绍了段边界内的任何数据,但超出段范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ELF格式中使用的两个透视图:段和节.

Two perspectives used in ELF format: segments and sections.

使用此透视图时,是否可以确保细分透视图查看文件的所有数据?

Is it guaranteed for segments perspective to see file's all data when using this perspective?

使用此透视图时,是否可以确保节透视图查看文件的所有数据?

Is it guaranteed for sections perspective to see file's all data when using this perspective?

换句话说:

有效的ELF格式的文件/图像是否可以包括位于该文件某些部分边界内的数据,但是超出该文件边界的所有段(不属于该文件的任何段)?

Can valid ELF format file/image include data located within boundaries of that file certain section however out of boundaries of that file all segments (to belong to no segment of that file)?

有效的ELF格式的文件/图像是否可以包括位于该文件的某个段边界内的数据,但是超出该文件的边界的所有段(不属于该文件的任何段)?

Can valid ELF format file/image include data located within boundaries of that file certain segment however out of boundaries of that file all sections (to belong to no section of that file)?

请考虑一下ELF标头,程序标头表和节标头表.

Please fade out in your considerations ELF header, programs header table and sections header table.

推荐答案

有效的ELF格式的文件/图像是否可以包括位于该文件某些部分边界内的数据,但是超出该文件边界的所有段(不属于该文件的任何段)?

Can valid ELF format file/image include data located within boundaries of that file certain section however out of boundaries of that file all segments (to belong to no segment of that file)?

是的.这是很常见的:没有理由将不可分配的节放在任何段中.具有 .debug_line .debug_info 等的任何文件都不会将这些部分映射到任何段中.

Yes. This is very common: there is no reason to put non-allocatable sections into any segments. Any file with .debug_line, .debug_info, etc. will have these sections not mapped into any of the segments.

有效的ELF格式的文件/图像是否可以包括位于该文件的某个段边界内的数据,但是超出该文件的边界的所有段(不属于该文件的任何段)?

Can valid ELF format file/image include data located within boundaries of that file certain segment however out of boundaries of that file all sections (to belong to no section of that file)?

是的.最终链接的文件不需要具有任何部分(在运行时只有部分是重要的),并且您可以使用 strip 剥离所有部分.在这样的剥离文件中,其任何段中的任何数据都不会属于任何节(因为没有节开头).

Yes. The final linked file is not required to have any sections at all (only segments matter at runtime), and you can strip all sections with strip. In such a stripped file, none of the data in any of its segments will belong to any section (as there are no sections to begin with).

这篇关于段边界内的任何数据,但超出段范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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