mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 00:09:26 +02:00
+ support writing of 32-bit and 64-bit relocations in the REL object writer
for Z80. This fixes DWARF debug output and makes it behave consistently with the Z80 external assembler writer.
This commit is contained in:
parent
d9e156e90e
commit
cf5feb0dca
@ -334,7 +334,7 @@ implementation
|
|||||||
|
|
||||||
procedure TRelObjData.writeReloc(Data: TRelocDataInt; len: aword; p: TObjSymbol; Reloctype: TObjRelocationType);
|
procedure TRelObjData.writeReloc(Data: TRelocDataInt; len: aword; p: TObjSymbol; Reloctype: TObjRelocationType);
|
||||||
var
|
var
|
||||||
bytes: array [0..1] of Byte;
|
bytes: array [0..7] of Byte;
|
||||||
symaddr: QWord;
|
symaddr: QWord;
|
||||||
objreloc: TRelRelocation;
|
objreloc: TRelRelocation;
|
||||||
begin
|
begin
|
||||||
@ -373,6 +373,26 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
case len of
|
case len of
|
||||||
|
8:
|
||||||
|
begin
|
||||||
|
bytes[0]:=Byte(Data);
|
||||||
|
bytes[1]:=Byte(Data shr 8);
|
||||||
|
bytes[2]:=Byte(Data shr 16);
|
||||||
|
bytes[3]:=Byte(Data shr 24);
|
||||||
|
bytes[4]:=0;
|
||||||
|
bytes[5]:=0;
|
||||||
|
bytes[6]:=0;
|
||||||
|
bytes[7]:=0;
|
||||||
|
writebytes(bytes,8);
|
||||||
|
end;
|
||||||
|
4:
|
||||||
|
begin
|
||||||
|
bytes[0]:=Byte(Data);
|
||||||
|
bytes[1]:=Byte(Data shr 8);
|
||||||
|
bytes[2]:=Byte(Data shr 16);
|
||||||
|
bytes[3]:=Byte(Data shr 24);
|
||||||
|
writebytes(bytes,4);
|
||||||
|
end;
|
||||||
2:
|
2:
|
||||||
begin
|
begin
|
||||||
bytes[0]:=Byte(Data);
|
bytes[0]:=Byte(Data);
|
||||||
|
Loading…
Reference in New Issue
Block a user