Moved the rld_export structure from <user_runtime.h> to
<runtime_loader.h>, since it isn't a kernel <-> userland interface. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28456 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -15,6 +15,39 @@
|
|||||||
|
|
||||||
#include <elf32.h>
|
#include <elf32.h>
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark - runtime loader libroot interface
|
||||||
|
|
||||||
|
|
||||||
|
struct user_space_program_args;
|
||||||
|
|
||||||
|
struct rld_export {
|
||||||
|
// runtime loader 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 *symbolName,
|
||||||
|
int32 *nameLength, int32 *symbolType, void **_location);
|
||||||
|
status_t (*test_executable)(const char *path, char *interpreter);
|
||||||
|
status_t (*get_next_image_dependency)(image_id id, uint32 *cookie,
|
||||||
|
const char **_name);
|
||||||
|
|
||||||
|
status_t (*reinit_after_fork)();
|
||||||
|
|
||||||
|
void (*call_atexit_hooks_for_range)(addr_t start, addr_t size);
|
||||||
|
|
||||||
|
void (*call_termination_hooks)();
|
||||||
|
|
||||||
|
const struct user_space_program_args *program_args;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern struct rld_export *__gRuntimeLoader;
|
||||||
|
|
||||||
|
|
||||||
|
// #pragma mark - runtime loader debugger interface
|
||||||
|
|
||||||
|
|
||||||
typedef struct elf_region_t {
|
typedef struct elf_region_t {
|
||||||
area_id id;
|
area_id id;
|
||||||
addr_t start;
|
addr_t start;
|
||||||
|
|||||||
@@ -30,27 +30,4 @@ struct user_space_program_args {
|
|||||||
char **env;
|
char **env;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rld_export {
|
|
||||||
// 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 *symbolName,
|
|
||||||
int32 *nameLength, int32 *symbolType, void **_location);
|
|
||||||
status_t (*test_executable)(const char *path, char *interpreter);
|
|
||||||
status_t (*get_next_image_dependency)(image_id id, uint32 *cookie,
|
|
||||||
const char **_name);
|
|
||||||
|
|
||||||
status_t (*reinit_after_fork)();
|
|
||||||
|
|
||||||
void (*call_atexit_hooks_for_range)(addr_t start, addr_t size);
|
|
||||||
|
|
||||||
void (*call_termination_hooks)();
|
|
||||||
|
|
||||||
const struct user_space_program_args *program_args;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern struct rld_export *__gRuntimeLoader;
|
|
||||||
|
|
||||||
#endif /* KERNEL_USER_RUNTIME_H_ */
|
#endif /* KERNEL_USER_RUNTIME_H_ */
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
SubDir HAIKU_TOP src system libroot ;
|
SubDir HAIKU_TOP src system libroot ;
|
||||||
|
|
||||||
UsePrivateHeaders libroot ;
|
UsePrivateHeaders libroot runtime_loader ;
|
||||||
UsePrivateSystemHeaders ;
|
UsePrivateSystemHeaders ;
|
||||||
|
|
||||||
UnarchiveObjects $(TARGET_GCC_LIBGCC_OBJECTS) : $(TARGET_GCC_LIBGCC) ;
|
UnarchiveObjects $(TARGET_GCC_LIBGCC_OBJECTS) : $(TARGET_GCC_LIBGCC) ;
|
||||||
# we need to link against libgcc.a objects and make
|
# we need to link against libgcc.a objects and make
|
||||||
# it available to other applications as in BeOS
|
# it available to other applications as in BeOS
|
||||||
|
|
||||||
local librootObjects =
|
local librootObjects =
|
||||||
os_main.o
|
os_main.o
|
||||||
os_arch_$(TARGET_ARCH).o
|
os_arch_$(TARGET_ARCH).o
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include <libroot_private.h>
|
|
||||||
#include <user_runtime.h>
|
|
||||||
#include <fork.h>
|
#include <fork.h>
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
|
#include <libroot_private.h>
|
||||||
#include <string.h>
|
#include <runtime_loader.h>
|
||||||
|
#include <user_runtime.h>
|
||||||
|
|
||||||
|
|
||||||
void initialize_before(image_id imageID);
|
void initialize_before(image_id imageID);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ SubDir HAIKU_TOP src system libroot os ;
|
|||||||
UsePrivateSystemHeaders ;
|
UsePrivateSystemHeaders ;
|
||||||
UsePrivateHeaders kernel ;
|
UsePrivateHeaders kernel ;
|
||||||
# for util/KMessage.h
|
# for util/KMessage.h
|
||||||
UsePrivateHeaders libroot ;
|
UsePrivateHeaders libroot runtime_loader ;
|
||||||
|
|
||||||
MergeObject os_main.o :
|
MergeObject os_main.o :
|
||||||
area.c
|
area.c
|
||||||
|
|||||||
@@ -5,8 +5,9 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <libroot_private.h>
|
#include <libroot_private.h>
|
||||||
#include <user_runtime.h>
|
#include <runtime_loader.h>
|
||||||
#include <syscalls.h>
|
#include <syscalls.h>
|
||||||
|
#include <user_runtime.h>
|
||||||
|
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ UsePrivateHeaders app shared [ FDirName syslog_daemon ] ;
|
|||||||
UsePrivateSystemHeaders ;
|
UsePrivateSystemHeaders ;
|
||||||
UsePrivateHeaders kernel ;
|
UsePrivateHeaders kernel ;
|
||||||
# For util/KMessage.h
|
# For util/KMessage.h
|
||||||
UsePrivateHeaders libroot ;
|
UsePrivateHeaders libroot runtime_loader ;
|
||||||
|
|
||||||
if $(HAIKU_MULTIUSER_QUERY) = 1 {
|
if $(HAIKU_MULTIUSER_QUERY) = 1 {
|
||||||
PWD_BACKEND = pwd_query.c ;
|
PWD_BACKEND = pwd_query.c ;
|
||||||
|
|||||||
@@ -8,11 +8,13 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <libroot_private.h>
|
#include <libroot_private.h>
|
||||||
#include <user_runtime.h>
|
|
||||||
|
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <runtime_loader.h>
|
||||||
|
#include <user_runtime.h>
|
||||||
|
|
||||||
|
|
||||||
static status_t sStatus;
|
static status_t sStatus;
|
||||||
// Note, this is not thread-safe
|
// Note, this is not thread-safe
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
SubDir HAIKU_TOP src system libroot posix stdlib ;
|
SubDir HAIKU_TOP src system libroot posix stdlib ;
|
||||||
|
|
||||||
UsePrivateHeaders drivers libroot ;
|
UsePrivateHeaders drivers libroot runtime_loader ;
|
||||||
UsePrivateSystemHeaders ;
|
UsePrivateSystemHeaders ;
|
||||||
|
|
||||||
MergeObject posix_stdlib.o :
|
MergeObject posix_stdlib.o :
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include <libroot_lock.h>
|
#include <libroot_lock.h>
|
||||||
#include <libroot_private.h>
|
#include <libroot_private.h>
|
||||||
|
#include <runtime_loader.h>
|
||||||
#include <user_runtime.h>
|
#include <user_runtime.h>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
#include <runtime_loader.h>
|
||||||
#include <syscalls.h>
|
#include <syscalls.h>
|
||||||
#include <user_runtime.h>
|
|
||||||
|
|
||||||
|
|
||||||
extern void _IO_cleanup(void);
|
extern void _IO_cleanup(void);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
SubDir HAIKU_TOP src system libroot posix unistd ;
|
SubDir HAIKU_TOP src system libroot posix unistd ;
|
||||||
|
|
||||||
UsePrivateSystemHeaders ;
|
UsePrivateSystemHeaders ;
|
||||||
UsePrivateHeaders libroot ;
|
UsePrivateHeaders libroot runtime_loader ;
|
||||||
|
|
||||||
MergeObject posix_unistd.o :
|
MergeObject posix_unistd.o :
|
||||||
access.c
|
access.c
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <libroot_private.h>
|
#include <libroot_private.h>
|
||||||
|
#include <runtime_loader.h>
|
||||||
#include <syscalls.h>
|
#include <syscalls.h>
|
||||||
#include <user_runtime.h>
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct fork_hook {
|
typedef struct fork_hook {
|
||||||
|
|||||||
Reference in New Issue
Block a user