* make sure tobjects are pointer-size aligned in case of VMT usage; fixes tw1365 on armeb-linux

git-svn-id: trunk@10544 -
This commit is contained in:
micha 2008-03-23 23:42:53 +00:00
parent 6305d7d5a3
commit 40211152d4
2 changed files with 5 additions and 1 deletions

View File

@ -1174,6 +1174,7 @@ implementation
obj : tobjectdef;
srsym : tsym;
st : tsymtable;
objst : tobjectsymtable;
curroffset : aint;
s,sorg : TIDString;
vmtwritten : boolean;
@ -1249,6 +1250,9 @@ implementation
(oo_has_vmt in def.objectoptions) and
(def.vmt_offset<fieldoffset) then
begin
objst:=tobjectsymtable(def.symtable);
if objst.recordalignment<sizeof(TConstPtrUInt) then
objst.recordalignment:=sizeof(TConstPtrUInt);
for i:=1 to def.vmt_offset-curroffset do
list.concat(tai_const.create_8bit(0));
list.concat(tai_const.createname(def.vmt_mangledname,0));

View File

@ -610,7 +610,7 @@ unit i_linux;
res : res_elf;
dbg : dbg_stabs;
script : script_unix;
endian : endian_little;
endian : endian_big;
alignment :
(
procalign : 4;