From 755b49ce34a14ff78d6065b1627248b1b9fac06b Mon Sep 17 00:00:00 2001 From: gingold Date: Thu, 13 Aug 2009 03:57:24 +0000 Subject: Allow to build in 64bits mode. --- ortho/mcode/binary_file-memory.adb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ortho/mcode/binary_file-memory.adb') 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; -- cgit v1.2.3