Subversion Repositories Kolibri OS

Rev

Rev 6767 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6767 Rev 8088
Line 5... Line 5...
5
;  Opens the module named filename and maps it in; returns a handle that can be
5
;  Opens the module named filename and maps it in; returns a handle that can be
6
;  passed to dlsym to get symbol values from it.
6
;  passed to dlsym to get symbol values from it.
7
;
7
;
8
;  If filename starts with '/', it is treated as an absolute file name.
8
;  If filename starts with '/', it is treated as an absolute file name.
9
;  Otherwise, dlopen searches for filename in predefined locations:
9
;  Otherwise, dlopen searches for filename in predefined locations:
10
;  /rd/1/lib, /kolibrios/lib, directory of the executable file.
10
;  /sys/lib, /kolibrios/lib, directory of the executable file.
11
;  The current directory is *not* searched.
11
;  The current directory is *not* searched.
12
;
12
;
13
;  If the same module is loaded again with dlopen(), the same
13
;  If the same module is loaded again with dlopen(), the same
14
;  handle is returned.  The loader maintains reference
14
;  handle is returned.  The loader maintains reference
15
;  counts for loaded modules, so a dynamically loaded module is
15
;  counts for loaded modules, so a dynamically loaded module is
Line 509... Line 509...
509
        jnz     .loaded_ok
509
        jnz     .loaded_ok
510
        ccall   loader_say_error, msg_cannot_open, edi, 0
510
        ccall   loader_say_error, msg_cannot_open, edi, 0
511
        jmp     .load_failed
511
        jmp     .load_failed
512
.relative:
512
.relative:
513
; 1d. The given path is relative.
513
; 1d. The given path is relative.
514
; Try /rd/1/lib/, /kolibrios/lib/ and path to executable
514
; Try /sys/lib/, /kolibrios/lib/ and path to executable
515
; in this order.
515
; in this order.
516
        stdcall try_map_module, module_path1, module_path1.size
516
        stdcall try_map_module, module_path1, module_path1.size
517
        test    eax, eax
517
        test    eax, eax
518
        jnz     .loaded_ok
518
        jnz     .loaded_ok
519
        stdcall try_map_module, module_path2, module_path2.size
519
        stdcall try_map_module, module_path2, module_path2.size