BCompiler.st
changeset 510 9f19de0f8f0b
parent 497 598e2319be5d
child 512 fed48886aff9
--- a/BCompiler.st	Wed Apr 16 13:47:24 1997 +0200
+++ b/BCompiler.st	Wed Apr 16 19:14:36 1997 +0200
@@ -2049,7 +2049,7 @@
     |stFileName stream handle address stcFlags cFlags
      command oFileName cFileName
      initName newMethod ok status className sep class stcPath ccPath 
-     errorStream errorMessages eMsg m supers mP moduleFileName|
+     errorStream errorMessages eMsg m supers mP moduleFileName dummyHandle|
 
     (mP := STCModulePath asFilename) exists ifFalse:[
        mP makeDirectory
@@ -2310,6 +2310,30 @@
         ].
     "/    ('handle is ' , handle printString) infoPrintCR.
 
+        "/ try libs to resolve symbols.
+        address := ObjectFileLoader getFunction:'__' , initName , '_Init' from:handle.
+        address isNil ifTrue:[
+            address := ObjectFileLoader getFunction:'_' , initName , '_Init' from:handle.
+            address isNil ifTrue:[
+                (ObjectFileLoader hasUndefinedSymbolsIn:handle) ifTrue:[
+                    ObjectFileLoader searchedLibraries do:[:libName |
+                        (ObjectFileLoader hasUndefinedSymbolsIn:handle) ifTrue:[
+                            Transcript showCR:'   ... trying ' , libName , ' to resolve undefined symbols ...'.
+                            dummyHandle := Array new:4.
+                            dummyHandle := ObjectFileLoader primLoadDynamicObject:libName into:dummyHandle.
+                            dummyHandle isNil ifTrue:[
+                                Transcript showCR:'   ... load of library ' , libName , ' failed.'.
+                            ]
+                        ]
+                    ].
+                    (ObjectFileLoader hasUndefinedSymbolsIn:handle) isNil ifTrue:[
+                        Transcript showCR:('LOADER: still undefined symbols in ',initName,'.').
+                    ].
+                ].
+
+            ]
+        ].
+
         address := ObjectFileLoader getFunction:'__' , initName , '_Init' from:handle.
         address isNil ifTrue:[
             address := ObjectFileLoader getFunction:'_' , initName , '_Init' from:handle.
@@ -2424,7 +2448,7 @@
 
     "Modified: 14.9.1995 / 22:33:04 / claus"
     "Modified: 28.12.1995 / 15:52:48 / stefan"
-    "Modified: 22.3.1997 / 16:17:28 / cg"
+    "Modified: 16.4.1997 / 18:50:54 / cg"
 !
 
 createLoadableObjectFor:baseFileName
@@ -2499,6 +2523,6 @@
 !ByteCodeCompiler class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.111 1997-03-22 15:20:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.112 1997-04-16 17:14:36 cg Exp $'
 ! !
 ByteCodeCompiler initialize!