mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 14:19:31 +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;
|
||||
protected
|
||||
procedure DoRelocationFixup(objsec:TObjSection);override;
|
||||
procedure Order_ObjSectionList(ObjSectionList : TFPObjectList;const aPattern:string);override;
|
||||
public
|
||||
constructor create;override;
|
||||
destructor destroy;override;
|
||||
@ -3577,6 +3578,27 @@ cleanup:
|
||||
{todo}
|
||||
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;
|
||||
begin
|
||||
inherited create;
|
||||
|
Loading…
Reference in New Issue
Block a user