2
0
Эх сурвалжийг харах

* strip the '.dll' extension from the library names before adding them to the
NewExe imported name table

git-svn-id: trunk@42614 -

nickysn 6 жил өмнө
parent
commit
dd9c76eeec
1 өөрчлөгдсөн 15 нэмэгдсэн , 1 устгасан
  1. 15 1
      compiler/ogomf.pas

+ 15 - 1
compiler/ogomf.pas

@@ -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
 *****************************************************************************}