更新时间:2023-02-09 16:30:34
传统上,出于以下两个原因,将只读数据放置在文本部分中:
Traditionally, read-only data was placed in the text section for two reasons:
在ELF目标上,对该方案进行了一些修改.现在,只读数据被放置在新的.rodata
部分中,该部分与.text
部分类似,但是它也无法执行,从而阻止了某些攻击向量.优点仍然存在.
On ELF targets, this scheme was modified a bit. Read-only data is now placed in the new .rodata
section which is like the .text
section except it also cannot be executed, preventing certain attack vectors. The advantages remain.