mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-11 06:39:33 +01:00
* 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:
parent
6305d7d5a3
commit
40211152d4
@ -1174,6 +1174,7 @@ implementation
|
|||||||
obj : tobjectdef;
|
obj : tobjectdef;
|
||||||
srsym : tsym;
|
srsym : tsym;
|
||||||
st : tsymtable;
|
st : tsymtable;
|
||||||
|
objst : tobjectsymtable;
|
||||||
curroffset : aint;
|
curroffset : aint;
|
||||||
s,sorg : TIDString;
|
s,sorg : TIDString;
|
||||||
vmtwritten : boolean;
|
vmtwritten : boolean;
|
||||||
@ -1249,6 +1250,9 @@ implementation
|
|||||||
(oo_has_vmt in def.objectoptions) and
|
(oo_has_vmt in def.objectoptions) and
|
||||||
(def.vmt_offset<fieldoffset) then
|
(def.vmt_offset<fieldoffset) then
|
||||||
begin
|
begin
|
||||||
|
objst:=tobjectsymtable(def.symtable);
|
||||||
|
if objst.recordalignment<sizeof(TConstPtrUInt) then
|
||||||
|
objst.recordalignment:=sizeof(TConstPtrUInt);
|
||||||
for i:=1 to def.vmt_offset-curroffset do
|
for i:=1 to def.vmt_offset-curroffset do
|
||||||
list.concat(tai_const.create_8bit(0));
|
list.concat(tai_const.create_8bit(0));
|
||||||
list.concat(tai_const.createname(def.vmt_mangledname,0));
|
list.concat(tai_const.createname(def.vmt_mangledname,0));
|
||||||
|
|||||||
@ -610,7 +610,7 @@ unit i_linux;
|
|||||||
res : res_elf;
|
res : res_elf;
|
||||||
dbg : dbg_stabs;
|
dbg : dbg_stabs;
|
||||||
script : script_unix;
|
script : script_unix;
|
||||||
endian : endian_little;
|
endian : endian_big;
|
||||||
alignment :
|
alignment :
|
||||||
(
|
(
|
||||||
procalign : 4;
|
procalign : 4;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user