为什么是16,每行代码的结果都是什么,能解释一下吗?
// 得到程序的装载地址,一般为0x400000
dwProgRAV=header->opt_head.ImageBase;
// 得到代码偏移,用代码段起始RVA减去此段的物理偏移
// 应为程序的入口计算公式是一个相对的偏移地址,计算公式为:
// 代码的写入地址+dwCodeOffset
dwCodeOffset=header->opt_head.BaseOfCode-dwPhysAddress;
// 代码写入的物理偏移
dwEntryWrite=header->section_header[0].PointerToRawData+header->
section_header[0].Misc.VirtualSize;
//对齐边界
mods=dwEntryWrite%16;
if(mods!=0)
{
dwEntryWrite+=(16-mods);
}
文章出处:http://www.diybl.com/course/4_webprogram/asp.net/asp_netshl/20071222/93205_3.html