Commit ad316add by Doug Rupp Committed by Arnaud Charlet

mlib-tgt-specific-vms-alpha.adb (Build_Dynamic_Library): Output a dummy transfer…

mlib-tgt-specific-vms-alpha.adb (Build_Dynamic_Library): Output a dummy transfer address for debugging.

2008-08-01  Doug Rupp  <rupp@adacore.com>

	* mlib-tgt-specific-vms-alpha.adb (Build_Dynamic_Library): Output a
	dummy transfer address for debugging.
	
	* mlib-tgt-specific-vms-ia64.adb (Build_Dynamic_Library): Likewise.

From-SVN: r138464
parent 0f300ef5
...@@ -276,12 +276,26 @@ package body MLib.Tgt.Specific is ...@@ -276,12 +276,26 @@ package body MLib.Tgt.Specific is
-- Create and write the auto-init assembly file -- Create and write the auto-init assembly file
declare declare
First_Line : constant String := use ASCII;
ASCII.HT & ".section LIB$INITIALIZE,GBL,NOWRT" &
ASCII.LF; -- Output a dummy transfer address for debugging
Second_Line : constant String := -- followed by the LIB$INITIALIZE section.
ASCII.HT & ".long " & Init_Proc & ASCII.LF;
-- First and second lines of the auto-init assembly file Lines : constant String :=
HT & ".text" & LF &
HT & ".align 4" & LF &
HT & ".globl __main" & LF &
HT & ".ent __main" & LF &
"__main..en:" & LF &
HT & ".base $27" & LF &
HT & ".frame $29,0,$26,8" & LF &
HT & "ret $31,($26),1" & LF &
HT & ".link" & LF &
"__main:" & LF &
HT & ".pdesc __main..en,null" & LF &
HT & ".end __main" & LF & LF &
HT & ".section LIB$INITIALIZE,GBL,NOWRT" & LF &
HT & ".long " & Init_Proc & LF;
begin begin
Macro_File := Create_File (Macro_File_Name, Text); Macro_File := Create_File (Macro_File_Name, Text);
...@@ -289,16 +303,9 @@ package body MLib.Tgt.Specific is ...@@ -289,16 +303,9 @@ package body MLib.Tgt.Specific is
if OK then if OK then
Len := Write Len := Write
(Macro_File, First_Line (First_Line'First)'Address, (Macro_File, Lines (Lines'First)'Address,
First_Line'Length); Lines'Length);
OK := Len = First_Line'Length; OK := Len = Lines'Length;
end if;
if OK then
Len := Write
(Macro_File, Second_Line (Second_Line'First)'Address,
Second_Line'Length);
OK := Len = Second_Line'Length;
end if; end if;
if OK then if OK then
......
...@@ -275,26 +275,30 @@ package body MLib.Tgt.Specific is ...@@ -275,26 +275,30 @@ package body MLib.Tgt.Specific is
-- Create and write the auto-init assembly file -- Create and write the auto-init assembly file
declare declare
First_Line : constant String := use ASCII;
ASCII.HT
& ".type " & Init_Proc & "#, @function" -- Output a dummy transfer address for debugging
& ASCII.LF; -- followed by the LIB$INITIALIZE section.
Second_Line : constant String :=
ASCII.HT Lines : constant String :=
& ".global " & Init_Proc & "#" HT & ".pred.safe_across_calls p1-p5,p16-p63" & LF &
& ASCII.LF; HT & ".text" & LF &
Third_Line : constant String := HT & ".align 16" & LF &
ASCII.HT HT & ".global __main#" & LF &
& ".global LIB$INITIALIZE#" HT & ".proc __main#" & LF &
& ASCII.LF; "__main:" & LF &
Fourth_Line : constant String := HT & ".prologue" & LF &
ASCII.HT HT & ".body" & LF &
& ".section LIB$INITIALIZE#,""a"",@progbits" HT & ".mib" & LF &
& ASCII.LF; HT & "nop 0" & LF &
Fifth_Line : constant String := HT & "nop 0" & LF &
ASCII.HT HT & "br.ret.sptk.many b0" & LF &
& "data4 @fptr(" & Init_Proc & "#)" HT & ".endp __main#" & LF & LF &
& ASCII.LF; HT & ".type " & Init_Proc & "#, @function" & LF &
HT & ".global " & Init_Proc & "#" & LF &
HT & ".global LIB$INITIALIZE#" & LF &
HT & ".section LIB$INITIALIZE#,""a"",@progbits" & LF &
HT & "data4 @fptr(" & Init_Proc & "#)" & LF;
begin begin
Macro_File := Create_File (Macro_File_Name, Text); Macro_File := Create_File (Macro_File_Name, Text);
...@@ -302,37 +306,9 @@ package body MLib.Tgt.Specific is ...@@ -302,37 +306,9 @@ package body MLib.Tgt.Specific is
if OK then if OK then
Len := Write Len := Write
(Macro_File, First_Line (First_Line'First)'Address, (Macro_File, Lines (Lines'First)'Address,
First_Line'Length); Lines'Length);
OK := Len = First_Line'Length; OK := Len = Lines'Length;
end if;
if OK then
Len := Write
(Macro_File, Second_Line (Second_Line'First)'Address,
Second_Line'Length);
OK := Len = Second_Line'Length;
end if;
if OK then
Len := Write
(Macro_File, Third_Line (Third_Line'First)'Address,
Third_Line'Length);
OK := Len = Third_Line'Length;
end if;
if OK then
Len := Write
(Macro_File, Fourth_Line (Fourth_Line'First)'Address,
Fourth_Line'Length);
OK := Len = Fourth_Line'Length;
end if;
if OK then
Len := Write
(Macro_File, Fifth_Line (Fifth_Line'First)'Address,
Fifth_Line'Length);
OK := Len = Fifth_Line'Length;
end if; end if;
if OK then if OK then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment