Updated dll.load. Added support for loading the library using the full path.

Fixed makefile for Whether  

git-svn-id: svn://kolibrios.org@9908 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Doczom 2023-03-28 16:39:08 +00:00
parent 3ade12b666
commit 77a4688f6d
3 changed files with 280 additions and 264 deletions

View File

@ -27,13 +27,21 @@ proc dll.Load, import_table:dword
jz .exit
push esi
mov esi, [esi + 4]
mov edi, esi
cmp byte[esi], '/'
jz .load_lib
mov edi, s_libdir.fname
@@:
lodsb
stosb
or al, al
jnz @b
mcall 68, 19, s_libdir
mov edi, s_libdir
.load_lib:
mcall 68, 19, edi ;s_libdir
or eax, eax
jz .fail_load
push eax

View File

@ -12,13 +12,21 @@ proc dll.Load, import_table:dword
jz .exit
push esi
mov esi, [esi + 4]
mov edi, esi
cmp byte[esi], '/'
jz .load_lib
mov edi, s_libdir.fname
@@:
lodsb
stosb
or al, al
jnz @b
mcall 68, 19, s_libdir
mov edi, s_libdir
.load_lib:
mcall 68, 19, edi ;s_libdir
or eax, eax
jz .fail
stdcall dll.Link, eax, edx

View File

@ -1,5 +1,5 @@
KTCC_DIR = ../../develop/ktcc/trunk
KLIBC = ../../develop/libraries/kolibri-libc
KLIBC = ../../develop/ktcc/trunk/libc.obj
NAME = weather
@ -7,8 +7,8 @@ KTCC=$(KTCC_DIR)/bin/kos32-tcc
KPACK = kpack
SRC= weather.c json/json.c
FLAGS= -nostdlib $(KLIBC)/lib/crt0.o -I $(KLIBC)/include -I $(KTCC_DIR)/libc/include -L$(KLIBC)/lib
LIBS =-ltcc -limg -lhttp -lc.obj
FLAGS= -B$(KTCC_DIR)/bin -I $(KLIBC)/include
LIBS = -limg -lhttp
all:
$(KTCC) $(FLAGS) $(SRC) $(LIBS) -o $(NAME)