Made our glue code compatible to BeOS again. IOW executables compiled for Haiku will
now run under BeOS as well (as long as they don't use any functions that are not available under R5). The solution is a bit messy, but we have to live with it :-) The runtime loader now patches the __gRuntimeLoader symbol in libroot.so to point to its exported structure instead of passing it to the init functions as an argument. (Hax0red by axeld and bonefish on stippi's assimilated machine -- resistence is futile) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15848 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2005, Axel Dörfler, [email protected].
|
||||
* Copyright 2003-2006, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2002, Manuel J. Petit. All rights reserved.
|
||||
@@ -15,6 +15,15 @@
|
||||
|
||||
#define MAGIC_APP_NAME "_APP_"
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
struct rld_export {
|
||||
// runtime linker API export
|
||||
image_id (*load_add_on)(char const *path, uint32 flags);
|
||||
@@ -25,20 +34,10 @@ struct rld_export {
|
||||
int32 *nameLength, int32 *symbolType, void **_location);
|
||||
status_t (*test_executable)(const char *path, uid_t user, gid_t group,
|
||||
char *starter);
|
||||
|
||||
const struct uspace_program_args *program_args;
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
/*
|
||||
* hooks into rld for POSIX and BeOS library/module loading
|
||||
*/
|
||||
struct rld_export *rld_export;
|
||||
};
|
||||
extern struct rld_export *__gRuntimeLoader;
|
||||
|
||||
#endif /* KERNEL_USER_RUNTIME_H_ */
|
||||
|
||||
Reference in New Issue
Block a user