ObjectFileLoader.st
changeset 633 26d6408e9d25
parent 618 1e2004ee0767
child 634 91490b70007e
--- a/ObjectFileLoader.st	Wed Nov 12 18:50:19 1997 +0100
+++ b/ObjectFileLoader.st	Tue Nov 25 16:49:58 1997 +0100
@@ -848,10 +848,11 @@
         ] ifFalse:[
             "/ try each directory    
 
-            LoadLibraryPath do:[:aDir |
-                f := (aDir , '/' , fn) asFilename.
+            (LoadLibraryPath asCollectionOfSubstringsSeparatedBy:$:) 
+            do:[:aDir |
+                f := aDir asFilename construct:fn.
                 f exists ifTrue:[
-                    handle := self loadObjectFile:(aDir , '/' , fn).
+                    handle := self loadObjectFile:f pathName.
                     handle notNil ifTrue:[^ handle].
                 ]
             ]
@@ -2132,6 +2133,36 @@
 
 !ObjectFileLoader class methodsFor:'lowlevel object loading'!
 
+initializeLoader
+    "initialize dynamic loader if required"
+ 
+    |stxName stxPathName|
+
+    stxPathName := OperatingSystem pathOfSTXExecutable.
+%{
+#ifdef GNU_DL
+  {
+    static alreadyInitialized = 0;
+    extern dld_ignore_redefinitions;
+
+    if (! alreadyInitialized) {
+	alreadyInitialized = 1;
+
+	if (@global(Verbose) == true) {
+	    printf ("dld_init(%s)\n", __stringVal(stxPathName));
+	}
+	/*
+	 * dld requires the running executables name,
+	 * to resolve symbols.
+	 */
+	(void) dld_init (__stringVal(stxPathName));
+	dld_ignore_redefinitions = 1;
+    }
+  }
+#endif
+%}.
+!
+
 loadDynamicObject:pathName
     "load an object-file (load/map into my address space).
      Return a non-nil handle if ok, nil otherwise.
@@ -2268,36 +2299,6 @@
     "Modified: 10.1.1997 / 17:58:23 / cg"
 !
 
-initializeLoader
-    "initialize dynamic loader if required"
- 
-    |stxName stxPathName|
-
-    stxPathName := OperatingSystem pathOfSTXExecutable.
-%{
-#ifdef GNU_DL
-  {
-    static alreadyInitialized = 0;
-    extern dld_ignore_redefinitions;
-
-    if (! alreadyInitialized) {
-	alreadyInitialized = 1;
-
-	if (@global(Verbose) == true) {
-	    printf ("dld_init(%s)\n", __stringVal(stxPathName));
-	}
-	/*
-	 * dld requires the running executables name,
-	 * to resolve symbols.
-	 */
-	(void) dld_init (__stringVal(stxPathName));
-	dld_ignore_redefinitions = 1;
-    }
-  }
-#endif
-%}.
-!
-
 primLoadDynamicObject:pathName into:anInfoBuffer
     "load an object-file (map into my address space).
      Return an OS-handle (whatever that is) - where some space
@@ -3277,6 +3278,6 @@
 !ObjectFileLoader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/ObjectFileLoader.st,v 1.150 1997-10-15 11:14:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ObjectFileLoader.st,v 1.151 1997-11-25 15:49:58 cg Exp $'
 ! !
 ObjectFileLoader initialize!