2002-07-09 16:24:59 +04:00
|
|
|
/*
|
2006-01-06 06:48:11 +03:00
|
|
|
* Copyright 2003-2006, Axel Dörfler, axeld@pinc-software.de.
|
2005-06-14 15:23:29 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Copyright 2002, Manuel J. Petit. All rights reserved.
|
|
|
|
* Distributed under the terms of the NewOS License.
|
|
|
|
*/
|
2003-01-12 19:22:09 +03:00
|
|
|
#ifndef KERNEL_USER_RUNTIME_H_
|
|
|
|
#define KERNEL_USER_RUNTIME_H_
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2005-06-14 15:23:29 +04:00
|
|
|
|
2003-01-12 19:22:09 +03:00
|
|
|
#include <image.h>
|
2004-02-23 06:14:49 +03:00
|
|
|
#include <OS.h>
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2005-06-14 15:23:29 +04:00
|
|
|
|
2003-01-12 19:22:09 +03:00
|
|
|
#define MAGIC_APP_NAME "_APP_"
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2006-01-06 06:48:11 +03:00
|
|
|
struct uspace_program_args {
|
|
|
|
char program_name[B_OS_NAME_LENGTH];
|
|
|
|
char program_path[B_PATH_NAME_LENGTH];
|
|
|
|
int argc;
|
|
|
|
int envc;
|
|
|
|
char **argv;
|
|
|
|
char **envp;
|
|
|
|
};
|
|
|
|
|
2004-02-23 06:14:49 +03:00
|
|
|
struct rld_export {
|
2003-01-12 19:22:09 +03:00
|
|
|
// 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);
|
2003-01-12 19:36:30 +03:00
|
|
|
status_t (*get_nth_image_symbol)(image_id imageID, int32 num, char *symbolName,
|
2003-01-12 19:22:09 +03:00
|
|
|
int32 *nameLength, int32 *symbolType, void **_location);
|
2005-06-14 15:23:29 +04:00
|
|
|
status_t (*test_executable)(const char *path, uid_t user, gid_t group,
|
|
|
|
char *starter);
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2006-01-06 06:48:11 +03:00
|
|
|
const struct uspace_program_args *program_args;
|
2002-07-09 16:24:59 +04:00
|
|
|
};
|
|
|
|
|
2006-01-06 06:48:11 +03:00
|
|
|
extern struct rld_export *__gRuntimeLoader;
|
|
|
|
|
2003-01-12 19:22:09 +03:00
|
|
|
#endif /* KERNEL_USER_RUNTIME_H_ */
|