From 50060dfd521097b1f98d4cde555c831d5684aeba Mon Sep 17 00:00:00 2001 From: yury Date: Mon, 4 May 2009 08:27:36 +0000 Subject: [PATCH] * Do not assume sizeof(pint) section alignment if no alignment is specified for the section. git-svn-id: trunk@13092 - --- compiler/ogcoff.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/ogcoff.pas b/compiler/ogcoff.pas index cf1c812db5..183c3045fb 100644 --- a/compiler/ogcoff.pas +++ b/compiler/ogcoff.pas @@ -742,7 +742,6 @@ const pemagic : array[0..3] of byte = ( alignflag : longword; begin aoptions:=[]; - aalign:=sizeof(pint); if flags and PE_SCN_CNT_CODE<>0 then include(aoptions,oso_executable); if flags and PE_SCN_MEM_DISCARDABLE<>0 then @@ -774,7 +773,11 @@ const pemagic : array[0..3] of byte = ( else if alignflag=PE_SCN_ALIGN_2BYTES then aalign:=2 else if alignflag=PE_SCN_ALIGN_1BYTES then - aalign:=1; + aalign:=1 + else if alignflag=0 then + aalign:=0 + else + Internalerror(2009050401); end;