mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 17:39:20 +02:00
Use writeUInt32LE/writeUInt16LE method to write multi-byte integer in importlib method in t_win unit (as all supported CPUs are little endian)
This commit is contained in:
parent
14ab1cfb71
commit
3db060e47a
@ -325,14 +325,14 @@ implementation
|
|||||||
ordint:=ordnr;
|
ordint:=ordnr;
|
||||||
if target_info.system in systems_peoptplus then
|
if target_info.system in systems_peoptplus then
|
||||||
begin
|
begin
|
||||||
objdata.writebytes(ordint,sizeof(ordint));
|
objdata.writeUInt32LE(ordint);
|
||||||
ordint:=$80000000;
|
ordint:=$80000000;
|
||||||
objdata.writebytes(ordint,sizeof(ordint));
|
objdata.writeUInt32LE(ordint);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
ordint:=ordint or $80000000;
|
ordint:=ordint or $80000000;
|
||||||
objdata.writebytes(ordint,sizeof(ordint));
|
objdata.writeUInt32LE(ordint);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -359,7 +359,7 @@ implementation
|
|||||||
idata6label:=objdata.SymbolDefine(asmprefix+'_'+tostr(idatalabnr),AB_LOCAL,AT_DATA);
|
idata6label:=objdata.SymbolDefine(asmprefix+'_'+tostr(idatalabnr),AB_LOCAL,AT_DATA);
|
||||||
absordnr:=Abs(ordnr);
|
absordnr:=Abs(ordnr);
|
||||||
{ write index hint }
|
{ write index hint }
|
||||||
objdata.writebytes(absordnr,2);
|
objdata.writeUInt16LE(absordnr);
|
||||||
if ordnr <= 0 then
|
if ordnr <= 0 then
|
||||||
objdata.writebytes(afuncname[1],length(afuncname));
|
objdata.writebytes(afuncname[1],length(afuncname));
|
||||||
objdata.writebytes(emptyint,1);
|
objdata.writebytes(emptyint,1);
|
||||||
|
Loading…
Reference in New Issue
Block a user