From 2331c7f052ef946d357037e694430a2f473e7af5 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Thu, 17 Mar 2005 17:14:06 +0000 Subject: General arch cleanup and prepare support for standalone execution of ldso. Added new asm for MIPS to be tested. All arches should retest. --- ldso/ldso/ldso.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ldso/ldso/ldso.c') diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index c2560a1a2..9713416cd 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -3,6 +3,7 @@ * Program to load an ELF binary on a linux system, and run it * after resolving ELF shared library symbols * + * Copyright (C) 2005 by Joakim Tjernlund * Copyright (C) 2000-2004 by Erik Andersen * Copyright (c) 1994-2000 Eric Youngdale, Peter MacDonald, * David Engel, Hongjiu Lu and Mitch D'Souza @@ -82,6 +83,8 @@ static void debug_fini (int status, void *arg) } #endif +extern void _start(void); + void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr, Elf32_auxv_t auxvt[AT_EGID + 1], char **envp, char **argv) @@ -129,6 +132,11 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr, _dl_progname = argv[0]; } + if (_start == (void *) auxvt[AT_ENTRY].a_un.a_fcn) { + _dl_dprintf(2, "Standalone exection is not supported yet\n"); + _dl_exit(1); + } + /* Start to build the tables of the modules that are required for * this beast to run. We start with the basic executable, and then * go from there. Eventually we will run across ourself, and we -- cgit v1.2.3