From ef6d88af27a59b50e32be7d550a8e095f23162b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 12 Jan 2003 16:22:09 +0000 Subject: [PATCH] Renamed "struct rld_export_t" to "struct rld_export", "struct uspace_prog_args_t" to "struct uspace_program_args", prog_name & prog_path to program_name and program_path. Moved the MAGIC_APPNAME to a BeOS compatible MAGIG_APP_NAME from rld_priv.h to this place. Removed the dlxxx() exports in the rld_export structure - instead, they will be implemented using the basic runtime linker API which is a slightly extended version of the standard BeOS calls (load_add_on() has a "flags" paramater to allow implementation of dlopen()). Completed the export API to be able to completely support the BeOS API. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2420 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/kernel/user_runtime.h | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/headers/private/kernel/user_runtime.h b/headers/private/kernel/user_runtime.h index 9f2139e87f..67f08ef451 100755 --- a/headers/private/kernel/user_runtime.h +++ b/headers/private/kernel/user_runtime.h @@ -2,28 +2,29 @@ ** Copyright 2002, Manuel J. Petit. All rights reserved. ** Distributed under the terms of the NewOS License. */ -#ifndef __newos__kernel__user_runtime__hh__ -#define __newos__kernel__user_runtime__hh__ - +#ifndef KERNEL_USER_RUNTIME_H_ +#define KERNEL_USER_RUNTIME_H_ +#include #include +#define MAGIC_APP_NAME "_APP_" -struct rld_export_t +struct rld_export { - int (*dl_open )(char const *path, unsigned flags); - int (*dl_close)(int lib, unsigned flags); - void *(*dl_sym )(int lib, char const *sym, unsigned flags); - - int (*load_addon)(char const *path, unsigned flags); - int (*unload_addon)(int add_on, unsigned flags); - void *(*addon_symbol)(int lib, char const *sym, unsigned flags); + // runtime linker API export + image_id (*load_add_on)(char const *path, uint32 flags); + status_t (*unload_add_on)(image_id imageID); + status_t (*get_image_symbol)(image_id imageID, char const *symbolName, + int32 symbolType, void **_location); + status_t (*get_nth_image_symbol)(image_id imageID, int32 num, char const *symbolName, + int32 *nameLength, int32 *symbolType, void **_location); }; -struct uspace_prog_args_t +struct uspace_program_args { - char prog_name[SYS_MAX_OS_NAME_LEN]; - char prog_path[SYS_MAX_PATH_LEN]; + char program_name[SYS_MAX_OS_NAME_LEN]; + char program_path[SYS_MAX_PATH_LEN]; int argc; int envc; char **argv; @@ -32,13 +33,12 @@ struct uspace_prog_args_t /* * hooks into rld for POSIX and BeOS library/module loading */ - struct rld_export_t *rld_export; + struct rld_export *rld_export; }; -typedef void (libinit_f)(unsigned, struct uspace_prog_args_t const *); +typedef void (libinit_f)(unsigned, struct uspace_program_args const *); -void INIT_BEFORE_CTORS(unsigned, struct uspace_prog_args_t const *); -void INIT_AFTER_CTORS(unsigned, struct uspace_prog_args_t const *); +//void INIT_BEFORE_CTORS(unsigned, struct uspace_prog_args const *); +//void INIT_AFTER_CTORS(unsigned, struct uspace_prog_args const *); - -#endif +#endif /* KERNEL_USER_RUNTIME_H_ */