mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 14:09:17 +02:00
+ added an TNewExeOutput.Order_ObjSectionList override and sort obj sections by
class name first, then by name, then by initial order git-svn-id: trunk@42551 -
This commit is contained in:
parent
b768673e96
commit
d10fb705e4
@ -481,6 +481,7 @@ interface
|
|||||||
procedure AddImportLibrariesExtractedFromObjectModules;
|
procedure AddImportLibrariesExtractedFromObjectModules;
|
||||||
protected
|
protected
|
||||||
procedure DoRelocationFixup(objsec:TObjSection);override;
|
procedure DoRelocationFixup(objsec:TObjSection);override;
|
||||||
|
procedure Order_ObjSectionList(ObjSectionList : TFPObjectList;const aPattern:string);override;
|
||||||
public
|
public
|
||||||
constructor create;override;
|
constructor create;override;
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
@ -3577,6 +3578,27 @@ cleanup:
|
|||||||
{todo}
|
{todo}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function INewExeOmfObjSectionClassNameCompare(Item1, Item2: Pointer): Integer;
|
||||||
|
var
|
||||||
|
I1 : TOmfObjSection absolute Item1;
|
||||||
|
I2 : TOmfObjSection absolute Item2;
|
||||||
|
begin
|
||||||
|
Result:=CompareStr(I1.ClassName,I2.ClassName);
|
||||||
|
if Result=0 then
|
||||||
|
Result:=CompareStr(I1.Name,I2.Name);
|
||||||
|
if Result=0 then
|
||||||
|
Result:=I1.SortOrder-I2.SortOrder;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TNewExeOutput.Order_ObjSectionList(ObjSectionList: TFPObjectList;const aPattern: string);
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
begin
|
||||||
|
for i:=0 to ObjSectionList.Count-1 do
|
||||||
|
TOmfObjSection(ObjSectionList[i]).SortOrder:=i;
|
||||||
|
ObjSectionList.Sort(@INewExeOmfObjSectionClassNameCompare);
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TNewExeOutput.create;
|
constructor TNewExeOutput.create;
|
||||||
begin
|
begin
|
||||||
inherited create;
|
inherited create;
|
||||||
|
Loading…
Reference in New Issue
Block a user