我在IDA中注意到,我分析的PE文件不仅有.rdata
部分,还有.idata
部分。有什么区别?
最佳答案
.rdata
用于常量数据。它是 .data 段的只读版本。.idata
包含导入目录(.edata 用于导出)。 EXE 和 DLL 使用它来指定导入和导出的函数。有关详细信息,请参阅 PE 格式规范 ( http://msdn.microsoft.com/library/windows/hardware/gg463125 )。
总结典型的段名称:
.text: Code
.data: Initialized data
.bss: Uninitialized data
.rdata: Const/read-only (and initialized) data
.edata: Export descriptors
.idata: Import descriptors
.reloc: Relocation table (for code instructions with absolute addressing when
the module could not be loaded at its preferred base address)
.rsrc: Resources (icon, bitmap, dialog, ...)
.tls: __declspec(thread) data (Fails with dynamically loaded DLLs -> hard to find bugs)
正如 Martin Rosenau 所提到的,分割名称只是典型的。真正的段类型在段 header 中指定或由存储在段中的数据的使用定义。
关于windows - .rdata 和 .idata 段有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19012300/