diff options
| author | Tristan Gingold <tgingold@free.fr> | 2022-04-04 06:41:21 +0200 |
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2022-04-04 06:41:21 +0200 |
| commit | f599ef1897cc77f7c4f2249be43bd45bc1243e29 (patch) | |
| tree | a986be3798d579938c64277773e37ca40a8a6195 /src/ortho/mcode/binary_file.ads | |
| parent | ecc10af3a4ce267165aff5481598d0f73b399176 (diff) | |
| download | ghdl-f599ef1897cc77f7c4f2249be43bd45bc1243e29.tar.gz ghdl-f599ef1897cc77f7c4f2249be43bd45bc1243e29.tar.bz2 ghdl-f599ef1897cc77f7c4f2249be43bd45bc1243e29.zip | |
ortho/mcode: handle image relative relocation (for Win64)
Diffstat (limited to 'src/ortho/mcode/binary_file.ads')
| -rw-r--r-- | src/ortho/mcode/binary_file.ads | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ortho/mcode/binary_file.ads b/src/ortho/mcode/binary_file.ads index c3f829d70..675c4832c 100644 --- a/src/ortho/mcode/binary_file.ads +++ b/src/ortho/mcode/binary_file.ads @@ -116,6 +116,10 @@ package Binary_File is procedure Gen_X86_32 (Sym : Symbol; Offset : Integer_32); procedure Gen_Sparc_32 (Sym : Symbol; Offset : Integer_32); + -- Image based address (for Win64 unwind info) + -- The result is a 32b offset from the image base to SYM + OFFSET + procedure Gen_X86_Img_32 (Sym : Symbol; Offset : Unsigned_32); + procedure Gen_Ppc_24 (V : Unsigned_32; Sym : Symbol); procedure Gen_Ua_Addr (Sym : Symbol; Offset : Integer_32); @@ -172,7 +176,7 @@ private -- Relocations. type Reloc_Kind is (Reloc_32, Reloc_Pc32, - Reloc_Abs, + Reloc_Abs, Reloc_Img_32, Reloc_Ua_32, Reloc_Ua_Addr, Reloc_Disp22, Reloc_Disp30, Reloc_Hi22, Reloc_Lo10, @@ -226,6 +230,8 @@ private Number : Natural; -- Virtual address, if set. Vaddr : Pc_Type; -- SSE.Integer_Address; + -- Offset relative to the image start + Img_Off : Pc_Type; -- Memory for this segment. Seg : Memsegs.Memseg_Type; end record; |
