Removed rld0.c (more or less merged its contents with rld.c).
Renamed RLD_STARTUP() runtime_loader() - the new entry point of the loader. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11943 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2,7 +2,6 @@ SubDir OBOS_TOP src kernel runtime_loader ;
|
|||||||
|
|
||||||
KernelObjects
|
KernelObjects
|
||||||
rld.c
|
rld.c
|
||||||
rld0.c
|
|
||||||
rldexport.c
|
rldexport.c
|
||||||
rldelf.c
|
rldelf.c
|
||||||
rldheap.c
|
rldheap.c
|
||||||
@@ -48,7 +47,6 @@ KernelStaticLibraryObjects librld.a :
|
|||||||
;
|
;
|
||||||
|
|
||||||
KernelLd rld.so :
|
KernelLd rld.so :
|
||||||
<$(SOURCE_GRIST)>rld0.o
|
|
||||||
<$(SOURCE_GRIST)>rld.o
|
<$(SOURCE_GRIST)>rld.o
|
||||||
<$(SOURCE_GRIST)>rldelf.o
|
<$(SOURCE_GRIST)>rldelf.o
|
||||||
<$(SOURCE_GRIST)>rldexport.o
|
<$(SOURCE_GRIST)>rldexport.o
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
|
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
|
||||||
OUTPUT_ARCH(powerpc)
|
OUTPUT_ARCH(powerpc)
|
||||||
|
|
||||||
ENTRY(RLD_STARTUP)
|
ENTRY(runtime_loader)
|
||||||
SEARCH_DIR("libgcc");
|
SEARCH_DIR("libgcc");
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
|
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
|
||||||
OUTPUT_ARCH(i386)
|
OUTPUT_ARCH(i386)
|
||||||
|
|
||||||
ENTRY(RLD_STARTUP)
|
ENTRY(runtime_loader)
|
||||||
SEARCH_DIR("libgcc");
|
SEARCH_DIR("libgcc");
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2002, Manuel J. Petit. All rights reserved.
|
* Copyright 2005, Axel Dörfler, [email protected].
|
||||||
** Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*
|
||||||
|
* Copyright 2002, Manuel J. Petit. All rights reserved.
|
||||||
|
* Distributed under the terms of the NewOS License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -10,14 +13,23 @@
|
|||||||
#include "rld_priv.h"
|
#include "rld_priv.h"
|
||||||
|
|
||||||
|
|
||||||
|
/** This is the main entry point of the runtime loader as
|
||||||
|
* specified by its ld-script.
|
||||||
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
rldmain(void *_args)
|
runtime_loader(void *_args)
|
||||||
{
|
{
|
||||||
struct uspace_program_args *args = (struct uspace_program_args *)_args;
|
struct uspace_program_args *args = (struct uspace_program_args *)_args;
|
||||||
void *entry = 0;
|
void *entry = 0;
|
||||||
|
|
||||||
rldheap_init();
|
#if DEBUG_RLD
|
||||||
|
close(0); open("/dev/console", 0); /* stdin */
|
||||||
|
close(1); open("/dev/console", 0); /* stdout */
|
||||||
|
close(2); open("/dev/console", 0); /* stderr */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
rldheap_init();
|
||||||
rldexport_init(args);
|
rldexport_init(args);
|
||||||
rldelf_init(args);
|
rldelf_init(args);
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
** Copyright 2002, Manuel J. Petit. All rights reserved.
|
|
||||||
** Distributed under the terms of the NewOS License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "rld_priv.h"
|
|
||||||
|
|
||||||
|
|
||||||
int RLD_STARTUP(void *args)
|
|
||||||
{
|
|
||||||
#if DEBUG_RLD
|
|
||||||
close(0); open("/dev/console", 0); /* stdin */
|
|
||||||
close(1); open("/dev/console", 0); /* stdout */
|
|
||||||
close(2); open("/dev/console", 0); /* stderr */
|
|
||||||
#endif
|
|
||||||
return rldmain(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -12,8 +12,7 @@
|
|||||||
#include <user_runtime.h>
|
#include <user_runtime.h>
|
||||||
|
|
||||||
|
|
||||||
int RLD_STARTUP(void *);
|
int runtime_loader(void *arg);
|
||||||
int rldmain(void *arg);
|
|
||||||
|
|
||||||
status_t unload_program(image_id imageID);
|
status_t unload_program(image_id imageID);
|
||||||
image_id load_program(char const *path, void **entry);
|
image_id load_program(char const *path, void **entry);
|
||||||
|
|||||||
Reference in New Issue
Block a user