|
@@ -923,10 +923,15 @@ Implementation
|
|
case hp.typ of
|
|
case hp.typ of
|
|
ait_align :
|
|
ait_align :
|
|
begin
|
|
begin
|
|
- { always use the maximum fillsize in this pass to avoid possible
|
|
|
|
- short jumps to become out of range }
|
|
|
|
- Tai_align_abstract(hp).fillsize:=Tai_align_abstract(hp).aligntype;
|
|
|
|
- ObjData.alloc(Tai_align_abstract(hp).fillsize);
|
|
|
|
|
|
+ if tai_align_abstract(hp).aligntype>1 then
|
|
|
|
+ begin
|
|
|
|
+ { always use the maximum fillsize in this pass to avoid possible
|
|
|
|
+ short jumps to become out of range }
|
|
|
|
+ Tai_align_abstract(hp).fillsize:=Tai_align_abstract(hp).aligntype;
|
|
|
|
+ ObjData.alloc(Tai_align_abstract(hp).fillsize);
|
|
|
|
+ end
|
|
|
|
+ else
|
|
|
|
+ Tai_align_abstract(hp).fillsize:=0;
|
|
end;
|
|
end;
|
|
ait_datablock :
|
|
ait_datablock :
|
|
begin
|
|
begin
|
|
@@ -1001,10 +1006,13 @@ Implementation
|
|
case hp.typ of
|
|
case hp.typ of
|
|
ait_align :
|
|
ait_align :
|
|
begin
|
|
begin
|
|
- { here we must determine the fillsize which is used in pass2 }
|
|
|
|
- Tai_align_abstract(hp).fillsize:=align(ObjData.CurrObjSec.Size,Tai_align_abstract(hp).aligntype)-
|
|
|
|
- ObjData.CurrObjSec.Size;
|
|
|
|
- ObjData.alloc(Tai_align_abstract(hp).fillsize);
|
|
|
|
|
|
+ if tai_align_abstract(hp).aligntype>1 then
|
|
|
|
+ begin
|
|
|
|
+ { here we must determine the fillsize which is used in pass2 }
|
|
|
|
+ Tai_align_abstract(hp).fillsize:=align(ObjData.CurrObjSec.Size,Tai_align_abstract(hp).aligntype)-
|
|
|
|
+ ObjData.CurrObjSec.Size;
|
|
|
|
+ ObjData.alloc(Tai_align_abstract(hp).fillsize);
|
|
|
|
+ end;
|
|
end;
|
|
end;
|
|
ait_datablock :
|
|
ait_datablock :
|
|
begin
|
|
begin
|
|
@@ -1085,6 +1093,8 @@ Implementation
|
|
{$endif x86}
|
|
{$endif x86}
|
|
leblen : byte;
|
|
leblen : byte;
|
|
lebbuf : array[0..63] of byte;
|
|
lebbuf : array[0..63] of byte;
|
|
|
|
+ objsym,
|
|
|
|
+ objsymend : TObjSymbol;
|
|
begin
|
|
begin
|
|
{ main loop }
|
|
{ main loop }
|
|
while assigned(hp) do
|
|
while assigned(hp) do
|
|
@@ -1132,6 +1142,15 @@ Implementation
|
|
ObjData.writebytes(Tai_string(hp).str^,Tai_string(hp).len);
|
|
ObjData.writebytes(Tai_string(hp).str^,Tai_string(hp).len);
|
|
ait_const :
|
|
ait_const :
|
|
begin
|
|
begin
|
|
|
|
+ { Recalculate relative symbols, addresses of forward references
|
|
|
|
+ can be changed in treepass1 }
|
|
|
|
+ if assigned(tai_const(hp).sym) and
|
|
|
|
+ assigned(tai_const(hp).endsym) then
|
|
|
|
+ begin
|
|
|
|
+ objsym:=Objdata.SymbolRef(tai_const(hp).sym);
|
|
|
|
+ objsymend:=Objdata.SymbolRef(tai_const(hp).endsym);
|
|
|
|
+ Tai_const(hp).value:=objsymend.address-objsym.address+Tai_const(hp).symofs;
|
|
|
|
+ end;
|
|
case tai_const(hp).consttype of
|
|
case tai_const(hp).consttype of
|
|
aitconst_64bit,
|
|
aitconst_64bit,
|
|
aitconst_32bit,
|
|
aitconst_32bit,
|