aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/mcode/binary_file-memory.ads
diff options
context:
space:
mode:
Diffstat (limited to 'src/ortho/mcode/binary_file-memory.ads')
-rw-r--r--src/ortho/mcode/binary_file-memory.ads11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ortho/mcode/binary_file-memory.ads b/src/ortho/mcode/binary_file-memory.ads
index a205da527..cc2b7e39b 100644
--- a/src/ortho/mcode/binary_file-memory.ads
+++ b/src/ortho/mcode/binary_file-memory.ads
@@ -15,6 +15,8 @@
-- along with GCC; see the file COPYING. If not, write to the Free
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-- 02111-1307, USA.
+with Ada.Unchecked_Conversion;
+
package Binary_File.Memory is
-- Must be called before set_symbol_address.
@@ -22,4 +24,13 @@ package Binary_File.Memory is
procedure Set_Symbol_Address (Sym : Symbol; Addr : System.Address);
procedure Write_Memory_Relocate (Error : out Boolean);
+
+ function Get_Section_Base (Sect : Section_Acc) return System.Address;
+ function Get_Section_Size (Sect : Section_Acc) return Pc_Type;
+
+ function To_Pc_Type is new Ada.Unchecked_Conversion
+ (Source => System.Address, Target => Pc_Type);
+ function To_Address is new Ada.Unchecked_Conversion
+ (Source => Pc_Type, Target => System.Address);
+
end Binary_File.Memory;