diff --git a/src/kernel/apps/rld/rld_priv.h b/src/kernel/apps/rld/rld_priv.h index 5f0c2ac863..09d10aaad3 100644 --- a/src/kernel/apps/rld/rld_priv.h +++ b/src/kernel/apps/rld/rld_priv.h @@ -1,8 +1,10 @@ /* -** Copyright 2002, Manuel J. Petit. All rights reserved. -** Distributed under the terms of the NewOS License. -*/ - + * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. + * Distributed under the terms of the MIT License. + * + * Copyright 2002, Manuel J. Petit. All rights reserved. + * Distributed under the terms of the NewOS License. + */ #ifndef RUN_TIME_LINKER_H #define RUN_TIME_LINKER_H @@ -26,8 +28,8 @@ void rldelf_init(struct uspace_program_args const *uspa); void rldexport_init(struct uspace_program_args *uspa); // RLD heap -void rldheap_init(void); +void rldheap_init(void); void *rldalloc(size_t); -void rldfree(void *p); +void rldfree(void *p); #endif /* RUN_TIME_LINKER_H */ diff --git a/src/kernel/apps/rld/rldelf.c b/src/kernel/apps/rld/rldelf.c index 912b9d5434..8580830c6c 100644 --- a/src/kernel/apps/rld/rldelf.c +++ b/src/kernel/apps/rld/rldelf.c @@ -39,7 +39,6 @@ // ToDo: implement better locking strategy // ToDo: implement unload_program() -// ToDo: implement search paths $LIBRARY_PATH, $ADDON_PATH // ToDo: implement lazy binding #define PAGE_MASK (B_PAGE_SIZE - 1) @@ -209,6 +208,8 @@ rld_lock() char * getenv(const char *name) { + // ToDo: this should use the real environ pointer once available! + // (or else, any updates to the search paths while the app is running are ignored) char **environ = gProgramArgs->envp; int32 length = strlen(name); int32 i; @@ -1021,7 +1022,6 @@ try_open_container(const char *dir, int dirLen, const char *name, char *path, memcpy(buffer, dir, dirLen); buffer[dirLen] = '/'; strcpy(buffer + dirLen + 1, name); - } else { if (nameLen >= pathLen) return B_NAME_TOO_LONG; @@ -1347,16 +1347,8 @@ put_image(image_t *image) // #pragma mark - +// Exported functions (to libroot.so) -/* - * exported functions: - * - * + load_program() - * + load_library() - * + unload_program() - * + unload_library() - * + dynamic_symbol() - */ image_id load_program(char const *path, void **_entry) diff --git a/src/kernel/apps/rld/rldexport.c b/src/kernel/apps/rld/rldexport.c index 223b58ebe1..e015a86e89 100644 --- a/src/kernel/apps/rld/rldexport.c +++ b/src/kernel/apps/rld/rldexport.c @@ -1,8 +1,11 @@ /* -** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. -** Copyright 2002, Manuel J. Petit. All rights reserved. -** Distributed under the terms of the NewOS License. -*/ + * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. + * Distributed under the terms of the MIT License. + * + * Copyright 2002, Manuel J. Petit. All rights reserved. + * Distributed under the terms of the NewOS License. + */ + #include "rld_priv.h" @@ -13,8 +16,6 @@ static image_id export_load_add_on(char const *name, uint32 flags) { - // ToDo: use load_add_on() here when it's implemented, or better, unify - // load_library() and load_add_on(). return load_library(name, flags, true); }