Files
haiku-beta6/src/kernel/libroot/os/image.c
T
Axel Dörfler dd6f547c66 Moved "__progname" from startup code to libroot_init.c (because BeOS start_dyn.o
doesn't export it), initialization has also moved to initialize_before().
Added BeOS compatibility stubs to allow execution of BeOS native apps - added
comments to every function; some of them might be removed later on again.
Also moved "environ" to posix/stdlib/env.c for the same reason.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-13 10:50:14 +00:00

77 lines
1.5 KiB
C

/*
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License.
*/
#include <OS.h>
#include <image.h>
#include "syscalls.h"
#include "user_runtime.h"
void __init__image(struct uspace_program_args const *);
static struct rld_export const *gRuntimeLinker;
image_id
load_add_on(char const *name)
{
return gRuntimeLinker->load_add_on(name, 0);
}
status_t
unload_add_on(image_id id)
{
return gRuntimeLinker->unload_add_on(id);
}
status_t
get_image_symbol(image_id id, char const *symbolName, int32 symbolType, void **_location)
{
return gRuntimeLinker->get_image_symbol(id, symbolName, symbolType, _location);
}
status_t
get_nth_image_symbol(image_id id, int32 num, char *nameBuffer, int32 *_nameLength,
int32 *_symbolType, void **_location)
{
return gRuntimeLinker->get_nth_image_symbol(id, num, nameBuffer, _nameLength, _symbolType, _location);
}
status_t
_get_image_info(image_id id, image_info *info, size_t infoSize)
{
return sys_get_image_info(id, info, infoSize);
}
status_t
_get_next_image_info(team_id team, int32 *cookie, image_info *info, size_t infoSize)
{
return sys_get_next_image_info(team, cookie, info, infoSize);
}
void
__init__image(struct uspace_program_args const *args)
{
gRuntimeLinker = args->rld_export;
}
void _call_init_routines_(void);
void
_call_init_routines_(void)
{
// This is called by the original BeOS startup code.
// We don't need it, because our loader already does the job, right?
}