pe: added a check for too small object alignment

This commit is contained in:
László Molnár
2007-05-17 18:02:50 +02:00
parent df8acc4ed7
commit 9e92c9ea12
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -1021,6 +1021,8 @@ void PackW32Pe::pack(OutputFile *fo)
oh.codebase = osection[1].vaddr;
// oh.headersize = osection[0].rawdataptr;
oh.headersize = rvamin;
if (rvamin < osection[0].rawdataptr)
throwCantPack("object alignment too small");
if (opt->win32_pe.strip_relocs && !isdll)
oh.flags |= RELOCS_STRIPPED;