* 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;
end;
function StripDllExt(const DllName:TSymStr):TSymStr;
implementation
uses
@ -4024,7 +4026,7 @@ cleanup:
begin
if not LibNameAdded then
begin
ImportedNameTable.AddImportedName(ImportLibrary.Name);
ImportedNameTable.AddImportedName(StripDllExt(ImportLibrary.Name));
LibNameAdded:=True;
end;
if (ImportSymbol.OrdNr=0) and (ImportSymbol.Name<>'') then
@ -4201,6 +4203,18 @@ cleanup:
CInternalAr:=TOmfLibObjectWriter;
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
*****************************************************************************}