forked from KolibriOS/kolibrios
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:
parent
3ade12b666
commit
77a4688f6d
@ -27,13 +27,21 @@ proc dll.Load, import_table:dword
|
|||||||
jz .exit
|
jz .exit
|
||||||
push esi
|
push esi
|
||||||
mov esi, [esi + 4]
|
mov esi, [esi + 4]
|
||||||
|
|
||||||
|
mov edi, esi
|
||||||
|
cmp byte[esi], '/'
|
||||||
|
jz .load_lib
|
||||||
|
|
||||||
mov edi, s_libdir.fname
|
mov edi, s_libdir.fname
|
||||||
@@:
|
@@:
|
||||||
lodsb
|
lodsb
|
||||||
stosb
|
stosb
|
||||||
or al, al
|
or al, al
|
||||||
jnz @b
|
jnz @b
|
||||||
mcall 68, 19, s_libdir
|
|
||||||
|
mov edi, s_libdir
|
||||||
|
.load_lib:
|
||||||
|
mcall 68, 19, edi ;s_libdir
|
||||||
or eax, eax
|
or eax, eax
|
||||||
jz .fail_load
|
jz .fail_load
|
||||||
push eax
|
push eax
|
||||||
|
@ -12,13 +12,21 @@ proc dll.Load, import_table:dword
|
|||||||
jz .exit
|
jz .exit
|
||||||
push esi
|
push esi
|
||||||
mov esi, [esi + 4]
|
mov esi, [esi + 4]
|
||||||
|
|
||||||
|
mov edi, esi
|
||||||
|
cmp byte[esi], '/'
|
||||||
|
jz .load_lib
|
||||||
|
|
||||||
mov edi, s_libdir.fname
|
mov edi, s_libdir.fname
|
||||||
@@:
|
@@:
|
||||||
lodsb
|
lodsb
|
||||||
stosb
|
stosb
|
||||||
or al, al
|
or al, al
|
||||||
jnz @b
|
jnz @b
|
||||||
mcall 68, 19, s_libdir
|
|
||||||
|
mov edi, s_libdir
|
||||||
|
.load_lib:
|
||||||
|
mcall 68, 19, edi ;s_libdir
|
||||||
or eax, eax
|
or eax, eax
|
||||||
jz .fail
|
jz .fail
|
||||||
stdcall dll.Link, eax, edx
|
stdcall dll.Link, eax, edx
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
KTCC_DIR = ../../develop/ktcc/trunk
|
KTCC_DIR = ../../develop/ktcc/trunk
|
||||||
KLIBC = ../../develop/libraries/kolibri-libc
|
KLIBC = ../../develop/ktcc/trunk/libc.obj
|
||||||
|
|
||||||
NAME = weather
|
NAME = weather
|
||||||
|
|
||||||
@ -7,8 +7,8 @@ KTCC=$(KTCC_DIR)/bin/kos32-tcc
|
|||||||
KPACK = kpack
|
KPACK = kpack
|
||||||
|
|
||||||
SRC= weather.c json/json.c
|
SRC= weather.c json/json.c
|
||||||
FLAGS= -nostdlib $(KLIBC)/lib/crt0.o -I $(KLIBC)/include -I $(KTCC_DIR)/libc/include -L$(KLIBC)/lib
|
FLAGS= -B$(KTCC_DIR)/bin -I $(KLIBC)/include
|
||||||
LIBS =-ltcc -limg -lhttp -lc.obj
|
LIBS = -limg -lhttp
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(KTCC) $(FLAGS) $(SRC) $(LIBS) -o $(NAME)
|
$(KTCC) $(FLAGS) $(SRC) $(LIBS) -o $(NAME)
|
||||||
|
Loading…
Reference in New Issue
Block a user