diff options
author | gingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7> | 2009-08-13 03:57:24 +0000 |
---|---|---|
committer | gingold <gingold@b72b5c32-5f01-0410-b925-b5c7b92870f7> | 2009-08-13 03:57:24 +0000 |
commit | 755b49ce34a14ff78d6065b1627248b1b9fac06b (patch) | |
tree | dd41ff93ca47e241d6b3d44abb3658ab85c1b821 /ortho/mcode/binary_file-memory.adb | |
parent | 95691d0545514352f6f8dde4558f51ce9345f748 (diff) | |
download | ghdl-755b49ce34a14ff78d6065b1627248b1b9fac06b.tar.gz ghdl-755b49ce34a14ff78d6065b1627248b1b9fac06b.tar.bz2 ghdl-755b49ce34a14ff78d6065b1627248b1b9fac06b.zip |
Allow to build in 64bits mode.
Diffstat (limited to 'ortho/mcode/binary_file-memory.adb')
-rw-r--r-- | ortho/mcode/binary_file-memory.adb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ortho/mcode/binary_file-memory.adb b/ortho/mcode/binary_file-memory.adb index 6e25f670d..4d5f74024 100644 --- a/ortho/mcode/binary_file-memory.adb +++ b/ortho/mcode/binary_file-memory.adb @@ -22,12 +22,13 @@ package body Binary_File.Memory is -- Absolute section. Sect_Abs : Section_Acc; + function To_Pc_Type is new Ada.Unchecked_Conversion + (Source => System.Address, Target => Pc_Type); + procedure Set_Symbol_Address (Sym : Symbol; Addr : System.Address) is - function Conv is new Ada.Unchecked_Conversion - (Source => System.Address, Target => Pc_Type); begin - Set_Symbol_Value (Sym, Conv (Addr)); + Set_Symbol_Value (Sym, To_Pc_Type (Addr)); Set_Scope (Sym, Sym_Global); Set_Section (Sym, Sect_Abs); end Set_Symbol_Address; @@ -40,7 +41,6 @@ package body Binary_File.Memory is procedure Write_Memory_Relocate (Error : out Boolean) is - use SSE; Sect : Section_Acc; Rel : Reloc_Acc; N_Rel : Reloc_Acc; @@ -58,7 +58,7 @@ package body Binary_File.Memory is end if; end if; if Sect.Data_Max > 0 and Sect /= Sect_Abs then - Sect.Vaddr := To_Integer (Sect.Data (0)'Address); + Sect.Vaddr := To_Pc_Type (Sect.Data (0)'Address); end if; Sect := Sect.Next; end loop; |