mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 16:49:20 +02:00
* ognlm.pas cleanup:
- removed redundant assigned() checks before .Free - removed DataPos_ExeSection method which only calls inherited - removed all references to RelocSections variable, it's safe because TExeOutput doesn't handle it since r21971. git-svn-id: trunk@23085 -
This commit is contained in:
parent
73030ddb57
commit
eb13da9355
@ -283,7 +283,6 @@ const NLM_MAX_DESCRIPTION_LENGTH = 127;
|
|||||||
procedure GenerateLibraryImports(ImportLibraryList:TFPHashObjectList);override;
|
procedure GenerateLibraryImports(ImportLibraryList:TFPHashObjectList);override;
|
||||||
procedure MemPos_Start;override;
|
procedure MemPos_Start;override;
|
||||||
procedure MemPos_ExeSection(const aname:string);override;
|
procedure MemPos_ExeSection(const aname:string);override;
|
||||||
procedure DataPos_ExeSection(const aname:string);override;
|
|
||||||
procedure NLMwriteString (const s : string; terminateWithZero : boolean);
|
procedure NLMwriteString (const s : string; terminateWithZero : boolean);
|
||||||
procedure objNLMwriteString (const s : string; terminateWithZero : boolean);
|
procedure objNLMwriteString (const s : string; terminateWithZero : boolean);
|
||||||
procedure ParseScript (linkscript:TCmdStrList); override;
|
procedure ParseScript (linkscript:TCmdStrList); override;
|
||||||
@ -390,7 +389,6 @@ end;
|
|||||||
MaxMemPos:=$7FFFFFFF;
|
MaxMemPos:=$7FFFFFFF;
|
||||||
SectionMemAlign:=$0;
|
SectionMemAlign:=$0;
|
||||||
SectionDataAlign:=0;
|
SectionDataAlign:=0;
|
||||||
RelocSection := true; // always needed for NLM's
|
|
||||||
nlmImports := TFPHashObjectList.create(true);
|
nlmImports := TFPHashObjectList.create(true);
|
||||||
nlmImpNames := TFPHashObjectList.create(false);
|
nlmImpNames := TFPHashObjectList.create(false);
|
||||||
NlmSymbols := TDynamicArray.create(4096);
|
NlmSymbols := TDynamicArray.create(4096);
|
||||||
@ -399,14 +397,10 @@ end;
|
|||||||
|
|
||||||
destructor TNLMexeoutput.destroy;
|
destructor TNLMexeoutput.destroy;
|
||||||
begin
|
begin
|
||||||
if assigned(nlmImports) then
|
nlmImports.Free;
|
||||||
nlmImports.Free;
|
nlmImpNames.Free;
|
||||||
if assigned(nlmImpNames) then
|
nlmSymbols.Free;
|
||||||
nlmImpNames.Free;
|
FexportFunctionOffsets.Free;
|
||||||
if assigned(nlmSymbols) then
|
|
||||||
nlmSymbols.Free;
|
|
||||||
if assigned(FexportFunctionOffsets) then
|
|
||||||
FexportFunctionOffsets.Free;
|
|
||||||
inherited destroy;
|
inherited destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1167,7 +1161,7 @@ function SecOpts(SecOptions:TObjSectionOptions):string;
|
|||||||
targetSectionName : string;
|
targetSectionName : string;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not RelocSection or FRelocsGenerated then
|
if FRelocsGenerated then
|
||||||
exit;
|
exit;
|
||||||
exesec:=FindExeSection('.reloc');
|
exesec:=FindExeSection('.reloc');
|
||||||
if exesec=nil then
|
if exesec=nil then
|
||||||
@ -1251,12 +1245,6 @@ function SecOpts(SecOptions:TObjSectionOptions):string;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TNLMexeoutput.DataPos_ExeSection(const aname:string);
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TNLMexeoutput.NLMwriteString (const s : string; terminateWithZero : boolean);
|
procedure TNLMexeoutput.NLMwriteString (const s : string; terminateWithZero : boolean);
|
||||||
var len : byte;
|
var len : byte;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user