Rev 6811 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6811 | Rev 8088 | ||
---|---|---|---|
1 | format PE DLL GUI 0.8 at 7FF00000h |
1 | format PE DLL GUI 0.8 at 7FF00000h |
2 | entry start |
2 | entry start |
3 | include '../../struct.inc' |
3 | include '../../struct.inc' |
4 | include '../../proc32.inc' |
4 | include '../../proc32.inc' |
5 | include 'fpo.inc' |
5 | include 'fpo.inc' |
6 | include 'export.inc' |
6 | include 'export.inc' |
7 | include 'pe.inc' |
7 | include 'pe.inc' |
8 | section '.text' code readable executable |
8 | section '.text' code readable executable |
9 | 9 | ||
10 | FS_STACK_MAX equ dword [fs:4] |
10 | FS_STACK_MAX equ dword [fs:4] |
11 | FS_STACK_MIN equ dword [fs:8] |
11 | FS_STACK_MIN equ dword [fs:8] |
12 | FS_SELF_PTR equ dword [fs:0x18] |
12 | FS_SELF_PTR equ dword [fs:0x18] |
13 | FS_ERRNO equ dword [fs:0x34] |
13 | FS_ERRNO equ dword [fs:0x34] |
14 | FS_SYSCALL_PTR equ dword [fs:0xC0] |
14 | FS_SYSCALL_PTR equ dword [fs:0xC0] |
15 | 15 | ||
16 | ENOMEM = 12 |
16 | ENOMEM = 12 |
17 | 17 | ||
18 | DLL_PROCESS_DETACH = 0 |
18 | DLL_PROCESS_DETACH = 0 |
19 | DLL_PROCESS_ATTACH = 1 |
19 | DLL_PROCESS_ATTACH = 1 |
20 | DLL_THREAD_ATTACH = 2 |
20 | DLL_THREAD_ATTACH = 2 |
21 | DLL_THREAD_DETACH = 3 |
21 | DLL_THREAD_DETACH = 3 |
22 | 22 | ||
23 | SYSCALL_METHOD_I40 = 1 |
23 | SYSCALL_METHOD_I40 = 1 |
24 | SYSCALL_METHOD_SYSENTER = 2 |
24 | SYSCALL_METHOD_SYSENTER = 2 |
25 | SYSCALL_METHOD_SYSCALL = 3 |
25 | SYSCALL_METHOD_SYSCALL = 3 |
26 | 26 | ||
27 | ; Pointer to this structure is passed as the third argument |
27 | ; Pointer to this structure is passed as the third argument |
28 | ; to 'start' procedure by the kernel. |
28 | ; to 'start' procedure by the kernel. |
29 | struct kernel_init_data |
29 | struct kernel_init_data |
30 | version dw ? |
30 | version dw ? |
31 | flags dw ? |
31 | flags dw ? |
32 | syscall_method dd ? |
32 | syscall_method dd ? |
33 | ; either one of SYSCALL_METHOD_xxx or pointer to procedure |
33 | ; either one of SYSCALL_METHOD_xxx or pointer to procedure |
34 | exe_base dd ? |
34 | exe_base dd ? |
35 | stack_base dd ? |
35 | stack_base dd ? |
36 | stack_size dd ? |
36 | stack_size dd ? |
37 | exe_path dd ? |
37 | exe_path dd ? |
38 | command_line dd ? |
38 | command_line dd ? |
39 | environment dd ? |
39 | environment dd ? |
40 | ends |
40 | ends |
41 | 41 | ||
42 | include 'sync.inc' |
42 | include 'sync.inc' |
43 | include 'malloc.inc' |
43 | include 'malloc.inc' |
44 | include 'peloader.inc' |
44 | include 'peloader.inc' |
45 | include 'modules.inc' |
45 | include 'modules.inc' |
46 | include 'cmdline.inc' |
46 | include 'cmdline.inc' |
47 | include 'thread.inc' |
47 | include 'thread.inc' |
48 | 48 | ||
49 | proc syscall_int40 |
49 | proc syscall_int40 |
50 | int 0x40 |
50 | int 0x40 |
51 | ret |
51 | ret |
52 | endp |
52 | endp |
53 | 53 | ||
54 | proc syscall_sysenter |
54 | proc syscall_sysenter |
55 | push ebp |
55 | push ebp |
56 | mov ebp, esp |
56 | mov ebp, esp |
57 | push @f |
57 | push @f |
58 | sysenter |
58 | sysenter |
59 | @@: |
59 | @@: |
60 | pop edx |
60 | pop edx |
61 | pop ecx |
61 | pop ecx |
62 | ret |
62 | ret |
63 | endp |
63 | endp |
64 | 64 | ||
65 | proc syscall_syscall |
65 | proc syscall_syscall |
66 | push ecx |
66 | push ecx |
67 | syscall |
67 | syscall |
68 | pop ecx |
68 | pop ecx |
69 | ret |
69 | ret |
70 | endp |
70 | endp |
71 | 71 | ||
72 | proc kercall |
72 | proc kercall |
73 | jmp FS_SYSCALL_PTR |
73 | jmp FS_SYSCALL_PTR |
74 | endp |
74 | endp |
75 | 75 | ||
76 | prologue@proc equ fpo_prologue |
76 | prologue@proc equ fpo_prologue |
77 | epilogue@proc equ fpo_epilogue |
77 | epilogue@proc equ fpo_epilogue |
78 | 78 | ||
79 | proc start stdcall, dll_base, reason, reserved |
79 | proc start stdcall, dll_base, reason, reserved |
80 | ; 1. Do nothing unless called by the kernel for DLL_PROCESS_ATTACH. |
80 | ; 1. Do nothing unless called by the kernel for DLL_PROCESS_ATTACH. |
81 | cmp [reason], DLL_PROCESS_ATTACH |
81 | cmp [reason], DLL_PROCESS_ATTACH |
82 | jnz .nothing |
82 | jnz .nothing |
83 | ; 2. Initialize process. |
83 | ; 2. Initialize process. |
84 | ; 2a. Validate version of the init struct. |
84 | ; 2a. Validate version of the init struct. |
85 | ; If not known, say a debug message and die. |
85 | ; If not known, say a debug message and die. |
86 | mov ebp, [reserved] |
86 | mov ebp, [reserved] |
87 | mov esi, [dll_base] |
87 | mov esi, [dll_base] |
88 | cmp [ebp+kernel_init_data.version], 1 |
88 | cmp [ebp+kernel_init_data.version], 1 |
89 | jnz .version_mismatch |
89 | jnz .version_mismatch |
90 | ; 2b. Get the system call code. |
90 | ; 2b. Get the system call code. |
91 | ; Note: relocations have not been fixed yet, |
91 | ; Note: relocations have not been fixed yet, |
92 | ; so we cannot use absolute addresses, only RVAs. |
92 | ; so we cannot use absolute addresses, only RVAs. |
93 | mov eax, [ebp+kernel_init_data.syscall_method] |
93 | mov eax, [ebp+kernel_init_data.syscall_method] |
94 | cmp eax, 0x10000 |
94 | cmp eax, 0x10000 |
95 | jae .syscall_absolute |
95 | jae .syscall_absolute |
96 | dec eax |
96 | dec eax |
97 | mov edx, rva syscall_int40 |
97 | mov edx, rva syscall_int40 |
98 | cmp eax, num_syscall_methods |
98 | cmp eax, num_syscall_methods |
99 | jae @f |
99 | jae @f |
100 | mov edx, [esi+eax*4+rva syscall_methods] |
100 | mov edx, [esi+eax*4+rva syscall_methods] |
101 | @@: |
101 | @@: |
102 | lea eax, [edx+esi] |
102 | lea eax, [edx+esi] |
103 | .syscall_absolute: |
103 | .syscall_absolute: |
104 | mov FS_SYSCALL_PTR, eax |
104 | mov FS_SYSCALL_PTR, eax |
105 | ; 2c. Fixup relocations so that we can use absolute offsets instead of RVAs |
105 | ; 2c. Fixup relocations so that we can use absolute offsets instead of RVAs |
106 | ; in rest of code. |
106 | ; in rest of code. |
107 | ; Note: this uses syscalls, so this step should be done after |
107 | ; Note: this uses syscalls, so this step should be done after |
108 | ; configuring FS_SYSCALL_PTR at step 2b. |
108 | ; configuring FS_SYSCALL_PTR at step 2b. |
109 | push kolibri_dll |
109 | push kolibri_dll |
110 | call fixup_pe_relocations |
110 | call fixup_pe_relocations |
111 | pop ecx |
111 | pop ecx |
112 | jc .die |
112 | jc .die |
113 | ; 2d. Initialize process heap. |
113 | ; 2d. Initialize process heap. |
114 | mov eax, [ebp+kernel_init_data.exe_base] |
114 | mov eax, [ebp+kernel_init_data.exe_base] |
115 | mov edx, [eax+STRIPPED_PE_HEADER.SizeOfHeapReserve] |
115 | mov edx, [eax+STRIPPED_PE_HEADER.SizeOfHeapReserve] |
116 | cmp word [eax], 'MZ' |
116 | cmp word [eax], 'MZ' |
117 | jnz @f |
117 | jnz @f |
118 | add eax, [eax+IMAGE_DOS_HEADER.e_lfanew] |
118 | add eax, [eax+IMAGE_DOS_HEADER.e_lfanew] |
119 | mov edx, [eax+IMAGE_NT_HEADERS.OptionalHeader.SizeOfHeapReserve] |
119 | mov edx, [eax+IMAGE_NT_HEADERS.OptionalHeader.SizeOfHeapReserve] |
120 | @@: |
120 | @@: |
121 | malloc_init |
121 | malloc_init |
122 | ; 2e. Allocate and fill MODULE structs for main exe and kolibri.dll. |
122 | ; 2e. Allocate and fill MODULE structs for main exe and kolibri.dll. |
123 | mov eax, [ebp+kernel_init_data.exe_path] |
123 | mov eax, [ebp+kernel_init_data.exe_path] |
124 | @@: |
124 | @@: |
125 | inc eax |
125 | inc eax |
126 | cmp byte [eax-1], 0 |
126 | cmp byte [eax-1], 0 |
127 | jnz @b |
127 | jnz @b |
128 | sub eax, [ebp+kernel_init_data.exe_path] |
128 | sub eax, [ebp+kernel_init_data.exe_path] |
129 | push eax |
129 | push eax |
130 | add eax, sizeof.MODULE |
130 | add eax, sizeof.MODULE |
131 | stdcall malloc, eax |
131 | stdcall malloc, eax |
132 | test eax, eax |
132 | test eax, eax |
133 | jz .die |
133 | jz .die |
134 | mov ebx, eax |
134 | mov ebx, eax |
135 | stdcall malloc, sizeof.MODULE + kolibri_dll.size |
135 | stdcall malloc, sizeof.MODULE + kolibri_dll.size |
136 | test eax, eax |
136 | test eax, eax |
137 | jz .die |
137 | jz .die |
138 | mov edx, modules_list |
138 | mov edx, modules_list |
139 | mov [edx+MODULE.next], ebx |
139 | mov [edx+MODULE.next], ebx |
140 | mov [ebx+MODULE.next], eax |
140 | mov [ebx+MODULE.next], eax |
141 | mov [eax+MODULE.next], edx |
141 | mov [eax+MODULE.next], edx |
142 | mov [edx+MODULE.prev], eax |
142 | mov [edx+MODULE.prev], eax |
143 | mov [eax+MODULE.prev], ebx |
143 | mov [eax+MODULE.prev], ebx |
144 | mov [ebx+MODULE.prev], edx |
144 | mov [ebx+MODULE.prev], edx |
145 | push esi |
145 | push esi |
146 | mov esi, kolibri_dll |
146 | mov esi, kolibri_dll |
147 | mov ecx, kolibri_dll.size |
147 | mov ecx, kolibri_dll.size |
148 | lea edi, [eax+MODULE.path] |
148 | lea edi, [eax+MODULE.path] |
149 | rep movsb |
149 | rep movsb |
150 | pop esi |
150 | pop esi |
151 | call init_module_struct |
151 | call init_module_struct |
152 | mov eax, ebx |
152 | mov eax, ebx |
153 | mov esi, [ebp+kernel_init_data.exe_path] |
153 | mov esi, [ebp+kernel_init_data.exe_path] |
154 | pop ecx |
154 | pop ecx |
155 | lea edi, [ebx+MODULE.path] |
155 | lea edi, [ebx+MODULE.path] |
156 | rep movsb |
156 | rep movsb |
157 | mov esi, [ebp+kernel_init_data.exe_base] |
157 | mov esi, [ebp+kernel_init_data.exe_base] |
158 | call init_module_struct |
158 | call init_module_struct |
159 | ; 2f. Copy rest of init struct and free memory. |
159 | ; 2f. Copy rest of init struct and free memory. |
160 | ; Parse command line to argc/argv here and move arguments to the heap |
160 | ; Parse command line to argc/argv here and move arguments to the heap |
161 | ; in order to save memory: init struct and heap use different pages, |
161 | ; in order to save memory: init struct and heap use different pages, |
162 | ; but typically data from init struct are far from the entire page, |
162 | ; but typically data from init struct are far from the entire page, |
163 | ; so moving it to heap does not increase actual physical heap size |
163 | ; so moving it to heap does not increase actual physical heap size |
164 | ; and allows to free init struct. |
164 | ; and allows to free init struct. |
165 | mov eax, [ebp+kernel_init_data.stack_base] |
165 | mov eax, [ebp+kernel_init_data.stack_base] |
166 | mov FS_STACK_MIN, eax |
166 | mov FS_STACK_MIN, eax |
167 | add eax, [ebp+kernel_init_data.stack_size] |
167 | add eax, [ebp+kernel_init_data.stack_size] |
168 | mov FS_STACK_MAX, eax |
168 | mov FS_STACK_MAX, eax |
169 | mov esi, [ebp+kernel_init_data.command_line] |
169 | mov esi, [ebp+kernel_init_data.command_line] |
170 | xor edx, edx |
170 | xor edx, edx |
171 | xor edi, edi |
171 | xor edi, edi |
172 | call parse_cmdline |
172 | call parse_cmdline |
173 | inc ebx ; argv[0] = exe path |
173 | inc ebx ; argv[0] = exe path |
174 | .argc equ dll_base |
174 | .argc equ dll_base |
175 | .argv equ reason |
175 | .argv equ reason |
176 | .envp equ reserved |
176 | .envp equ reserved |
177 | mov [.argc], ebx |
177 | mov [.argc], ebx |
178 | sub esi, [ebp+kernel_init_data.command_line] |
178 | sub esi, [ebp+kernel_init_data.command_line] |
179 | lea esi, [esi+(ebx+1)*4] |
179 | lea esi, [esi+(ebx+1)*4] |
180 | stdcall malloc, esi |
180 | stdcall malloc, esi |
181 | test eax, eax |
181 | test eax, eax |
182 | jz .die |
182 | jz .die |
183 | mov [.argv], eax |
183 | mov [.argv], eax |
184 | mov edx, eax |
184 | mov edx, eax |
185 | lea edi, [eax+(ebx+1)*4] |
185 | lea edi, [eax+(ebx+1)*4] |
186 | mov eax, [modules_list + MODULE.next] |
186 | mov eax, [modules_list + MODULE.next] |
187 | add eax, MODULE.path |
187 | add eax, MODULE.path |
188 | mov [edx], eax |
188 | mov [edx], eax |
189 | add edx, 4 |
189 | add edx, 4 |
190 | mov esi, [ebp+kernel_init_data.command_line] |
190 | mov esi, [ebp+kernel_init_data.command_line] |
191 | call parse_cmdline |
191 | call parse_cmdline |
192 | and dword [edx], 0 ; argv[argc] = NULL |
192 | and dword [edx], 0 ; argv[argc] = NULL |
193 | and [.envp], 0 |
193 | and [.envp], 0 |
194 | mov eax, 68 |
194 | mov eax, 68 |
195 | mov ebx, 13 |
195 | mov ebx, 13 |
196 | mov ecx, ebp |
196 | mov ecx, ebp |
197 | call FS_SYSCALL_PTR |
197 | call FS_SYSCALL_PTR |
198 | ; 2g. Initialize mutex for list of MODULEs. |
198 | ; 2g. Initialize mutex for list of MODULEs. |
199 | mov ecx, modules_mutex |
199 | mov ecx, modules_mutex |
200 | call mutex_init |
200 | call mutex_init |
201 | ; 2h. For console applications, call console.dll!con_init with default parameters. |
201 | ; 2h. For console applications, call console.dll!con_init with default parameters. |
202 | mov eax, [modules_list + MODULE.next] |
202 | mov eax, [modules_list + MODULE.next] |
203 | mov esi, [eax+MODULE.base] |
203 | mov esi, [eax+MODULE.base] |
204 | mov al, [esi+STRIPPED_PE_HEADER.Subsystem] |
204 | mov al, [esi+STRIPPED_PE_HEADER.Subsystem] |
205 | cmp byte [esi], 'M' |
205 | cmp byte [esi], 'M' |
206 | jnz @f |
206 | jnz @f |
207 | mov eax, [esi+3Ch] |
207 | mov eax, [esi+3Ch] |
208 | mov al, byte [esi+eax+IMAGE_NT_HEADERS.OptionalHeader.Subsystem] |
208 | mov al, byte [esi+eax+IMAGE_NT_HEADERS.OptionalHeader.Subsystem] |
209 | @@: |
209 | @@: |
210 | cmp al, IMAGE_SUBSYSTEM_WINDOWS_CUI |
210 | cmp al, IMAGE_SUBSYSTEM_WINDOWS_CUI |
211 | jnz .noconsole |
211 | jnz .noconsole |
212 | stdcall dlopen, console_dll, 0 |
212 | stdcall dlopen, console_dll, 0 |
213 | test eax, eax |
213 | test eax, eax |
214 | jz .noconsole |
214 | jz .noconsole |
215 | stdcall dlsym, eax, con_init_str |
215 | stdcall dlsym, eax, con_init_str |
216 | test eax, eax |
216 | test eax, eax |
217 | jz .noconsole |
217 | jz .noconsole |
218 | mov edx, [modules_list + MODULE.next] |
218 | mov edx, [modules_list + MODULE.next] |
219 | stdcall eax, -1, -1, -1, -1, [edx+MODULE.filename] |
219 | stdcall eax, -1, -1, -1, -1, [edx+MODULE.filename] |
220 | .noconsole: |
220 | .noconsole: |
221 | ; 3. Configure modules: main EXE and possible statically linked DLLs. |
221 | ; 3. Configure modules: main EXE and possible statically linked DLLs. |
222 | mov eax, [modules_list + MODULE.next] |
222 | mov eax, [modules_list + MODULE.next] |
223 | mov esi, [eax+MODULE.base] |
223 | mov esi, [eax+MODULE.base] |
224 | add eax, MODULE.path |
224 | add eax, MODULE.path |
225 | push eax |
225 | push eax |
226 | call fixup_pe_relocations |
226 | call fixup_pe_relocations |
227 | pop ecx |
227 | pop ecx |
228 | jc .die |
228 | jc .die |
229 | mutex_lock modules_mutex |
229 | mutex_lock modules_mutex |
230 | mov esi, [modules_list + MODULE.next] |
230 | mov esi, [modules_list + MODULE.next] |
231 | call resolve_pe_imports |
231 | call resolve_pe_imports |
232 | mov ebx, eax |
232 | mov ebx, eax |
233 | mutex_unlock modules_mutex |
233 | mutex_unlock modules_mutex |
234 | test ebx, ebx |
234 | test ebx, ebx |
235 | jnz .die |
235 | jnz .die |
236 | ; 4. Call exe entry point. |
236 | ; 4. Call exe entry point. |
237 | mov esi, [esi+MODULE.base] |
237 | mov esi, [esi+MODULE.base] |
238 | mov edx, [esi+STRIPPED_PE_HEADER.AddressOfEntryPoint] |
238 | mov edx, [esi+STRIPPED_PE_HEADER.AddressOfEntryPoint] |
239 | cmp byte [esi], 'M' |
239 | cmp byte [esi], 'M' |
240 | jnz @f |
240 | jnz @f |
241 | mov ecx, [esi+IMAGE_DOS_HEADER.e_lfanew] |
241 | mov ecx, [esi+IMAGE_DOS_HEADER.e_lfanew] |
242 | add ecx, esi |
242 | add ecx, esi |
243 | mov edx, [ecx+IMAGE_NT_HEADERS.OptionalHeader.AddressOfEntryPoint] |
243 | mov edx, [ecx+IMAGE_NT_HEADERS.OptionalHeader.AddressOfEntryPoint] |
244 | @@: |
244 | @@: |
245 | add edx, esi |
245 | add edx, esi |
246 | pop ecx |
246 | pop ecx |
247 | mov [process_initialized], 1 |
247 | mov [process_initialized], 1 |
248 | call edx |
248 | call edx |
249 | ; If exe entry point has returned control, die. |
249 | ; If exe entry point has returned control, die. |
250 | jmp .die |
250 | jmp .die |
251 | .version_mismatch: |
251 | .version_mismatch: |
252 | lea eax, [esi + rva syscall_int40] |
252 | lea eax, [esi + rva syscall_int40] |
253 | mov FS_SYSCALL_PTR, eax |
253 | mov FS_SYSCALL_PTR, eax |
254 | add esi, rva msg_version_mismatch |
254 | add esi, rva msg_version_mismatch |
255 | call sys_msg_board_str |
255 | call sys_msg_board_str |
256 | .die: |
256 | .die: |
257 | or eax, -1 |
257 | or eax, -1 |
258 | call FS_SYSCALL_PTR |
258 | call FS_SYSCALL_PTR |
259 | .nothing: |
259 | .nothing: |
260 | ret |
260 | ret |
261 | endp |
261 | endp |
262 | 262 | ||
263 | proc sys_msg_board_str |
263 | proc sys_msg_board_str |
264 | push eax ebx |
264 | push eax ebx |
265 | @@: |
265 | @@: |
266 | push ecx |
266 | push ecx |
267 | mov cl, [ecx] |
267 | mov cl, [ecx] |
268 | test cl, cl |
268 | test cl, cl |
269 | jz @f |
269 | jz @f |
270 | mov eax, 63 |
270 | mov eax, 63 |
271 | mov ebx, 1 |
271 | mov ebx, 1 |
272 | call FS_SYSCALL_PTR |
272 | call FS_SYSCALL_PTR |
273 | pop ecx |
273 | pop ecx |
274 | inc ecx |
274 | inc ecx |
275 | jmp @b |
275 | jmp @b |
276 | @@: |
276 | @@: |
277 | pop ecx ebx eax |
277 | pop ecx ebx eax |
278 | ret |
278 | ret |
279 | endp |
279 | endp |
280 | 280 | ||
281 | align 4 |
281 | align 4 |
282 | syscall_methods dd rva syscall_int40, rva syscall_sysenter, rva syscall_syscall |
282 | syscall_methods dd rva syscall_int40, rva syscall_sysenter, rva syscall_syscall |
283 | num_syscall_methods = ($ - syscall_methods) / 4 |
283 | num_syscall_methods = ($ - syscall_methods) / 4 |
284 | 284 | ||
285 | align 4 |
285 | align 4 |
286 | data export |
286 | data export |
287 | export 'kolibri.dll' \ |
287 | export 'kolibri.dll' \ |
288 | , kercall, 'kercall' \ |
288 | , kercall, 'kercall' \ |
289 | , malloc, 'malloc' \ |
289 | , malloc, 'malloc' \ |
290 | , free, 'free' \ |
290 | , free, 'free' \ |
291 | , calloc, 'calloc' \ |
291 | , calloc, 'calloc' \ |
292 | , realloc, 'realloc' \ |
292 | , realloc, 'realloc' \ |
293 | , realloc_in_place, 'realloc_in_place' \ |
293 | , realloc_in_place, 'realloc_in_place' \ |
294 | , memalign, 'memalign' \ |
294 | , memalign, 'memalign' \ |
295 | , create_mspace, 'create_mspace' \ |
295 | , create_mspace, 'create_mspace' \ |
296 | , destroy_mspace, 'destroy_mspace' \ |
296 | , destroy_mspace, 'destroy_mspace' \ |
297 | , mspace_malloc, 'mspace_malloc' \ |
297 | , mspace_malloc, 'mspace_malloc' \ |
298 | , mspace_free, 'mspace_free' \ |
298 | , mspace_free, 'mspace_free' \ |
299 | , mspace_calloc, 'mspace_calloc' \ |
299 | , mspace_calloc, 'mspace_calloc' \ |
300 | , mspace_realloc, 'mspace_realloc' \ |
300 | , mspace_realloc, 'mspace_realloc' \ |
301 | , mspace_realloc_in_place, 'mspace_realloc_in_place' \ |
301 | , mspace_realloc_in_place, 'mspace_realloc_in_place' \ |
302 | , mspace_memalign, 'mspace_memalign' \ |
302 | , mspace_memalign, 'mspace_memalign' \ |
303 | , dlopen, 'dlopen' \ |
303 | , dlopen, 'dlopen' \ |
304 | , dlclose, 'dlclose' \ |
304 | , dlclose, 'dlclose' \ |
305 | , dlsym, 'dlsym' \ |
305 | , dlsym, 'dlsym' \ |
306 | , create_thread, 'create_thread' \ |
306 | , create_thread, 'create_thread' \ |
307 | , exit_thread, 'exit_thread' \ |
307 | , exit_thread, 'exit_thread' \ |
308 | 308 | ||
309 | end data |
309 | end data |
310 | 310 | ||
311 | kolibri_dll db '/rd/1/lib/kolibri.dll',0 |
311 | kolibri_dll db '/sys/lib/kolibri.dll',0 |
312 | .size = $ - kolibri_dll |
312 | .size = $ - kolibri_dll |
313 | 313 | ||
314 | console_dll db 'console.dll',0 |
314 | console_dll db 'console.dll',0 |
315 | con_init_str db 'con_init',0 |
315 | con_init_str db 'con_init',0 |
316 | 316 | ||
317 | msg_version_mismatch db 'S : Version mismatch between kernel and kolibri.dll',13,10,0 |
317 | msg_version_mismatch db 'S : Version mismatch between kernel and kolibri.dll',13,10,0 |
318 | msg_bad_relocation db 'Bad relocation type in ',0 |
318 | msg_bad_relocation db 'Bad relocation type in ',0 |
319 | msg_newline db 13,10,0 |
319 | msg_newline db 13,10,0 |
320 | msg_relocated1 db 'S : fixups for ',0 |
320 | msg_relocated1 db 'S : fixups for ',0 |
321 | msg_relocated2 db ' applied',13,10,0 |
321 | msg_relocated2 db ' applied',13,10,0 |
322 | msg_noreloc1 db 'Module ',0 |
322 | msg_noreloc1 db 'Module ',0 |
323 | msg_noreloc2 db ' is not at preferred base and has no fixups',0 |
323 | msg_noreloc2 db ' is not at preferred base and has no fixups',0 |
324 | loader_debugboard_prefix db 'S : ',0 |
324 | loader_debugboard_prefix db 'S : ',0 |
325 | notify_program db '/rd/1/@notify',0 |
325 | notify_program db '/sys/@notify',0 |
326 | msg_cannot_open db 'Cannot open ',0 |
326 | msg_cannot_open db 'Cannot open ',0 |
327 | msg_paths_begin db ' in any of ' |
327 | msg_paths_begin db ' in any of ' |
328 | 328 | ||
329 | module_path1 db '/rd/1/lib/' |
329 | module_path1 db '/sys/lib/' |
330 | .size = $ - module_path1 |
330 | .size = $ - module_path1 |
331 | db ', ' |
331 | db ', ' |
332 | module_path2 db '/kolibrios/lib/' |
332 | module_path2 db '/kolibrios/lib/' |
333 | .size = $ - module_path2 |
333 | .size = $ - module_path2 |
334 | db ', ',0 |
334 | db ', ',0 |
335 | msg_export_name_not_found db 'Exported function ',0 |
335 | msg_export_name_not_found db 'Exported function ',0 |
336 | msg_export_ordinal_not_found db 'Exported ordinal #',0 |
336 | msg_export_ordinal_not_found db 'Exported ordinal #',0 |
337 | msg_export_not_found db ' not found in module ',0 |
337 | msg_export_not_found db ' not found in module ',0 |
338 | msg_unknown db ' |
338 | msg_unknown db ' |
339 | msg_invalid_forwarder db 'Invalid forwarded export in module ',0 |
339 | msg_invalid_forwarder db 'Invalid forwarded export in module ',0 |
340 | 340 | ||
341 | section '.data' data readable writable |
341 | section '.data' data readable writable |
342 | if FOOTERS |
342 | if FOOTERS |
343 | malloc_magic dd ? |
343 | malloc_magic dd ? |
344 | end if |
344 | end if |
345 | default_heap dd ? |
345 | default_heap dd ? |
346 | modules_list rd 2 |
346 | modules_list rd 2 |
347 | modules_mutex MUTEX |
347 | modules_mutex MUTEX |
348 | process_initialized db ? |
348 | process_initialized db ? |