* strip the '.dll' extension from the library names before adding them to the

NewExe imported name table

git-svn-id: trunk@42614 -
This commit is contained in:
nickysn 2019-08-09 14:19:41 +00:00
parent deefeb1ca0
commit dd9c76eeec

View File

@ -614,6 +614,8 @@ interface
constructor create(info: pasminfo; smart:boolean);override; constructor create(info: pasminfo; smart:boolean);override;
end; end;
function StripDllExt(const DllName:TSymStr):TSymStr;
implementation implementation
uses uses
@ -4024,7 +4026,7 @@ cleanup:
begin begin
if not LibNameAdded then if not LibNameAdded then
begin begin
ImportedNameTable.AddImportedName(ImportLibrary.Name); ImportedNameTable.AddImportedName(StripDllExt(ImportLibrary.Name));
LibNameAdded:=True; LibNameAdded:=True;
end; end;
if (ImportSymbol.OrdNr=0) and (ImportSymbol.Name<>'') then if (ImportSymbol.OrdNr=0) and (ImportSymbol.Name<>'') then
@ -4201,6 +4203,18 @@ cleanup:
CInternalAr:=TOmfLibObjectWriter; CInternalAr:=TOmfLibObjectWriter;
end; end;
{*****************************************************************************
Procedures and functions
*****************************************************************************}
function StripDllExt(const DllName:TSymStr):TSymStr;
begin
if UpCase(ExtractFileExt(DllName))='.DLL' then
Result:=Copy(DllName,1,Length(DllName)-4)
else
Result:=DllName;
end;
{***************************************************************************** {*****************************************************************************
Initialize Initialize
*****************************************************************************} *****************************************************************************}