diff options
| author | Tristan Gingold <tgingold@free.fr> | 2023-01-26 07:33:44 +0100 |
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2023-01-26 21:56:29 +0100 |
| commit | 74c048cdb4b19d41f70880ebf3d3e6eb58404097 (patch) | |
| tree | 9180f7dedb279cede535e375da4cb7cf0ff3d8bc /src/ortho/mcode/binary_file-memory.adb | |
| parent | 061d1a8726712c3f57b8fe57bf7ef89331a33ed0 (diff) | |
| download | ghdl-74c048cdb4b19d41f70880ebf3d3e6eb58404097.tar.gz ghdl-74c048cdb4b19d41f70880ebf3d3e6eb58404097.tar.bz2 ghdl-74c048cdb4b19d41f70880ebf3d3e6eb58404097.zip | |
mcode: add new functions for JIT
Diffstat (limited to 'src/ortho/mcode/binary_file-memory.adb')
| -rw-r--r-- | src/ortho/mcode/binary_file-memory.adb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ortho/mcode/binary_file-memory.adb b/src/ortho/mcode/binary_file-memory.adb index 2442952c1..4c823701c 100644 --- a/src/ortho/mcode/binary_file-memory.adb +++ b/src/ortho/mcode/binary_file-memory.adb @@ -204,9 +204,12 @@ package body Binary_File.Memory is end if; end Write_Memory_Relocate; - function Get_Section_Addr (Sect : Section_Acc) return System.Address is + function Get_Section_Addr (Sect : Section_Acc) return System.Address + is + function To_Address is new Ada.Unchecked_Conversion + (Source => Byte_Array_Acc, Target => System.Address); begin - return Sect.Data (0)'Address; + return To_Address (Sect.Data); end Get_Section_Addr; function Get_Section_Size (Sect : Section_Acc) return Pc_Type is |
