|
@@ -729,6 +729,11 @@ unit ag386bin;
|
|
var
|
|
var
|
|
hp : pai;
|
|
hp : pai;
|
|
begin
|
|
begin
|
|
|
|
+ objectalloc^.resetsections;
|
|
|
|
+ objectalloc^.setsection(sec_code);
|
|
|
|
+
|
|
|
|
+ objectoutput^.initwriting(cut_normal);
|
|
|
|
+ objectoutput^.defaultsection(sec_code);
|
|
{ reset the asmsymbol list }
|
|
{ reset the asmsymbol list }
|
|
ResetAsmsymbolList;
|
|
ResetAsmsymbolList;
|
|
objectoutput^.defaultsection(sec_code);
|
|
objectoutput^.defaultsection(sec_code);
|
|
@@ -795,6 +800,13 @@ unit ag386bin;
|
|
{$ifdef GDB}
|
|
{$ifdef GDB}
|
|
EndFileLineInfo;
|
|
EndFileLineInfo;
|
|
{$endif GDB}
|
|
{$endif GDB}
|
|
|
|
+
|
|
|
|
+ { leave if errors have occured }
|
|
|
|
+ if errorcount>0 then
|
|
|
|
+ exit;
|
|
|
|
+
|
|
|
|
+ { write last objectfile }
|
|
|
|
+ objectoutput^.donewriting;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -803,6 +815,11 @@ unit ag386bin;
|
|
hp : pai;
|
|
hp : pai;
|
|
startsec : tsection;
|
|
startsec : tsection;
|
|
begin
|
|
begin
|
|
|
|
+ objectalloc^.resetsections;
|
|
|
|
+ objectalloc^.setsection(sec_code);
|
|
|
|
+
|
|
|
|
+ objectoutput^.initwriting(cut_normal);
|
|
|
|
+ objectoutput^.defaultsection(sec_code);
|
|
startsec:=sec_code;
|
|
startsec:=sec_code;
|
|
{ start with list 1 }
|
|
{ start with list 1 }
|
|
currlistidx:=1;
|
|
currlistidx:=1;
|
|
@@ -850,16 +867,19 @@ unit ag386bin;
|
|
StartFileLineInfo;
|
|
StartFileLineInfo;
|
|
{$endif GDB}
|
|
{$endif GDB}
|
|
hp:=TreePass2(hp);
|
|
hp:=TreePass2(hp);
|
|
|
|
+{$ifdef GDB}
|
|
|
|
+ EndFileLineInfo;
|
|
|
|
+{$endif GDB}
|
|
{ leave if errors have occured }
|
|
{ leave if errors have occured }
|
|
if errorcount>0 then
|
|
if errorcount>0 then
|
|
exit;
|
|
exit;
|
|
|
|
|
|
- { end of lists? }
|
|
|
|
- if not MaybeNextList(hp) then
|
|
|
|
- break;
|
|
|
|
{ if not end then write the current objectfile }
|
|
{ if not end then write the current objectfile }
|
|
objectoutput^.donewriting;
|
|
objectoutput^.donewriting;
|
|
|
|
|
|
|
|
+ { end of lists? }
|
|
|
|
+ if not MaybeNextList(hp) then
|
|
|
|
+ break;
|
|
{ save section for next loop }
|
|
{ save section for next loop }
|
|
{ this leads to a problem if startsec is sec_none !! PM }
|
|
{ this leads to a problem if startsec is sec_none !! PM }
|
|
startsec:=objectalloc^.currsec;
|
|
startsec:=objectalloc^.currsec;
|
|
@@ -886,10 +906,7 @@ unit ag386bin;
|
|
startsec:=sec_code;
|
|
startsec:=sec_code;
|
|
|
|
|
|
if not MaybeNextList(hp) then
|
|
if not MaybeNextList(hp) then
|
|
- break;
|
|
|
|
-{$ifdef GDB}
|
|
|
|
- EndFileLineInfo;
|
|
|
|
-{$endif GDB}
|
|
|
|
|
|
+ break;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -903,11 +920,6 @@ unit ag386bin;
|
|
end;
|
|
end;
|
|
|
|
|
|
begin
|
|
begin
|
|
- objectalloc^.resetsections;
|
|
|
|
- objectalloc^.setsection(sec_code);
|
|
|
|
-
|
|
|
|
- objectoutput^.initwriting(cut_normal);
|
|
|
|
- objectoutput^.defaultsection(sec_code);
|
|
|
|
|
|
|
|
if cs_debuginfo in aktmoduleswitches then
|
|
if cs_debuginfo in aktmoduleswitches then
|
|
addlist(debuglist);
|
|
addlist(debuglist);
|
|
@@ -929,13 +941,6 @@ unit ag386bin;
|
|
writetreesmart
|
|
writetreesmart
|
|
else
|
|
else
|
|
writetree;
|
|
writetree;
|
|
-
|
|
|
|
- { leave if errors have occured }
|
|
|
|
- if errorcount>0 then
|
|
|
|
- exit;
|
|
|
|
-
|
|
|
|
- { write last objectfile }
|
|
|
|
- objectoutput^.donewriting;
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -966,7 +971,10 @@ unit ag386bin;
|
|
end.
|
|
end.
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.39 2000-03-09 10:07:18 pierre
|
|
|
|
|
|
+ Revision 1.40 2000-03-09 14:29:47 pierre
|
|
|
|
+ * fix for the stab section size changes with smartlinking
|
|
|
|
+
|
|
|
|
+ Revision 1.39 2000/03/09 10:07:18 pierre
|
|
* fix a problem with smartlink and stabs
|
|
* fix a problem with smartlink and stabs
|
|
|
|
|
|
Revision 1.38 2000/02/18 21:54:07 pierre
|
|
Revision 1.38 2000/02/18 21:54:07 pierre
|