|
@@ -470,10 +470,12 @@ interface
|
|
procedure Order_ObjSection(const aname:string);virtual;
|
|
procedure Order_ObjSection(const aname:string);virtual;
|
|
procedure MemPos_Start;virtual;
|
|
procedure MemPos_Start;virtual;
|
|
procedure MemPos_Header;virtual;
|
|
procedure MemPos_Header;virtual;
|
|
|
|
+ procedure MemPos_ExeSection(exesec:TExeSection);
|
|
procedure MemPos_ExeSection(const aname:string);virtual;
|
|
procedure MemPos_ExeSection(const aname:string);virtual;
|
|
procedure MemPos_EndExeSection;virtual;
|
|
procedure MemPos_EndExeSection;virtual;
|
|
procedure DataPos_Start;virtual;
|
|
procedure DataPos_Start;virtual;
|
|
procedure DataPos_Header;virtual;
|
|
procedure DataPos_Header;virtual;
|
|
|
|
+ procedure DataPos_ExeSection(exesec:TExeSection);
|
|
procedure DataPos_ExeSection(const aname:string);virtual;
|
|
procedure DataPos_ExeSection(const aname:string);virtual;
|
|
procedure DataPos_EndExeSection;virtual;
|
|
procedure DataPos_EndExeSection;virtual;
|
|
procedure DataPos_Symbols;virtual;
|
|
procedure DataPos_Symbols;virtual;
|
|
@@ -1912,29 +1914,35 @@ implementation
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
- procedure TExeOutput.MemPos_ExeSection(const aname:string);
|
|
|
|
|
|
+ procedure TExeOutput.MemPos_ExeSection(exesec:TExeSection);
|
|
var
|
|
var
|
|
i : longint;
|
|
i : longint;
|
|
objsec : TObjSection;
|
|
objsec : TObjSection;
|
|
begin
|
|
begin
|
|
- { Section can be removed }
|
|
|
|
- FCurrExeSec:=FindExeSection(aname);
|
|
|
|
- if not assigned(CurrExeSec) then
|
|
|
|
- exit;
|
|
|
|
-
|
|
|
|
{ Alignment of ExeSection }
|
|
{ Alignment of ExeSection }
|
|
CurrMemPos:=align(CurrMemPos,SectionMemAlign);
|
|
CurrMemPos:=align(CurrMemPos,SectionMemAlign);
|
|
- CurrExeSec.MemPos:=CurrMemPos;
|
|
|
|
|
|
+ exesec.MemPos:=CurrMemPos;
|
|
|
|
|
|
{ set position of object ObjSections }
|
|
{ set position of object ObjSections }
|
|
- for i:=0 to CurrExeSec.ObjSectionList.Count-1 do
|
|
|
|
|
|
+ for i:=0 to exesec.ObjSectionList.Count-1 do
|
|
begin
|
|
begin
|
|
- objsec:=TObjSection(CurrExeSec.ObjSectionList[i]);
|
|
|
|
|
|
+ objsec:=TObjSection(exesec.ObjSectionList[i]);
|
|
CurrMemPos:=objsec.setmempos(CurrMemPos);
|
|
CurrMemPos:=objsec.setmempos(CurrMemPos);
|
|
end;
|
|
end;
|
|
|
|
|
|
{ calculate size of the section }
|
|
{ calculate size of the section }
|
|
- CurrExeSec.Size:=CurrMemPos-CurrExeSec.MemPos;
|
|
|
|
|
|
+ exesec.Size:=CurrMemPos-exesec.MemPos;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ procedure TExeOutput.MemPos_ExeSection(const aname:string);
|
|
|
|
+ begin
|
|
|
|
+ { Section can be removed }
|
|
|
|
+ FCurrExeSec:=FindExeSection(aname);
|
|
|
|
+ if not assigned(CurrExeSec) then
|
|
|
|
+ exit;
|
|
|
|
+
|
|
|
|
+ MemPos_ExeSection(CurrExeSec);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -1956,34 +1964,29 @@ implementation
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
- procedure TExeOutput.DataPos_ExeSection(const aname:string);
|
|
|
|
|
|
+ procedure TExeOutput.DataPos_ExeSection(exesec:TExeSection);
|
|
var
|
|
var
|
|
i : longint;
|
|
i : longint;
|
|
objsec : TObjSection;
|
|
objsec : TObjSection;
|
|
begin
|
|
begin
|
|
- { Section can be removed }
|
|
|
|
- FCurrExeSec:=FindExeSection(aname);
|
|
|
|
- if not assigned(CurrExeSec) then
|
|
|
|
- exit;
|
|
|
|
-
|
|
|
|
{ don't write normal section if writing only debug info }
|
|
{ don't write normal section if writing only debug info }
|
|
if (ExeWriteMode=ewm_dbgonly) and
|
|
if (ExeWriteMode=ewm_dbgonly) and
|
|
- not(oso_debug in CurrExeSec.SecOptions) then
|
|
|
|
|
|
+ not(oso_debug in exesec.SecOptions) then
|
|
exit;
|
|
exit;
|
|
|
|
|
|
- if (oso_Data in currexesec.SecOptions) then
|
|
|
|
|
|
+ if (oso_Data in exesec.SecOptions) then
|
|
begin
|
|
begin
|
|
CurrDataPos:=align(CurrDataPos,SectionDataAlign);
|
|
CurrDataPos:=align(CurrDataPos,SectionDataAlign);
|
|
- CurrExeSec.DataPos:=CurrDataPos;
|
|
|
|
|
|
+ exesec.DataPos:=CurrDataPos;
|
|
end;
|
|
end;
|
|
|
|
|
|
{ set position of object ObjSections }
|
|
{ set position of object ObjSections }
|
|
- for i:=0 to CurrExeSec.ObjSectionList.Count-1 do
|
|
|
|
|
|
+ for i:=0 to exesec.ObjSectionList.Count-1 do
|
|
begin
|
|
begin
|
|
- objsec:=TObjSection(CurrExeSec.ObjSectionList[i]);
|
|
|
|
|
|
+ objsec:=TObjSection(exesec.ObjSectionList[i]);
|
|
if (oso_Data in objsec.SecOptions) then
|
|
if (oso_Data in objsec.SecOptions) then
|
|
begin
|
|
begin
|
|
- if not(oso_Data in currexesec.SecOptions) then
|
|
|
|
|
|
+ if not(oso_Data in exesec.SecOptions) then
|
|
internalerror(200603043);
|
|
internalerror(200603043);
|
|
if not assigned(objsec.Data) then
|
|
if not assigned(objsec.Data) then
|
|
internalerror(200603044);
|
|
internalerror(200603044);
|
|
@@ -1993,6 +1996,16 @@ implementation
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
+ procedure TExeOutput.DataPos_ExeSection(const aname:string);
|
|
|
|
+ begin
|
|
|
|
+ { Section can be removed }
|
|
|
|
+ FCurrExeSec:=FindExeSection(aname);
|
|
|
|
+ if not assigned(CurrExeSec) then
|
|
|
|
+ exit;
|
|
|
|
+ DataPos_ExeSection(CurrExeSec);
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+
|
|
procedure TExeOutput.DataPos_EndExeSection;
|
|
procedure TExeOutput.DataPos_EndExeSection;
|
|
begin
|
|
begin
|
|
if not assigned(CurrExeSec) then
|
|
if not assigned(CurrExeSec) then
|