Index: uspace/app/dload/Makefile
===================================================================
--- uspace/app/dload/Makefile	(revision b678410d7e2eada8e2e3f65aaf7c4efc831777d6)
+++ 	(revision )
@@ -1,46 +1,0 @@
-#
-# Copyright (c) 2011 Jiri Svoboda
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-USPACE_PREFIX = ../..
-LIBS =
-EXTRA_CFLAGS = -I../../srv/loader/include -I../../lib/c/rtld/include -Iinclude
-LINKER_SCRIPT = arch/$(UARCH)/_link.ld
-EXTRA_CLEAN = $(LINKER_SCRIPT)
-BINARY = dload
-
-include $(USPACE_PREFIX)/../Makefile.config
-include arch/$(UARCH)/Makefile.inc
-
-SOURCES = \
-	dload.c \
-	$(ARCH_SOURCES)
-
-include $(USPACE_PREFIX)/Makefile.common
-
-$(LINKER_SCRIPT): $(LINKER_SCRIPT).in
-	$(GCC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@
Index: uspace/app/dload/arch/ia32/Makefile.inc
===================================================================
--- uspace/app/dload/arch/ia32/Makefile.inc	(revision b678410d7e2eada8e2e3f65aaf7c4efc831777d6)
+++ 	(revision )
@@ -1,32 +1,0 @@
-#
-# Copyright (c) 2008 Jiri Svoboda
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-CFLAGS += -D__32_BITS__
-
-ARCH_SOURCES := \
-	arch/$(UARCH)/start.c
Index: uspace/app/dload/arch/ia32/_link.ld.in
===================================================================
--- uspace/app/dload/arch/ia32/_link.ld.in	(revision b678410d7e2eada8e2e3f65aaf7c4efc831777d6)
+++ 	(revision )
@@ -1,84 +1,0 @@
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-        text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	. = 0x60001000 + SIZEOF_HEADERS;
-
-	.init : {
-		*(.init);
-	} :text
-	.text : {
-		*(.text);
-		*(.text.*);
-		*(.rodata*);
-	} :text
-
-	.rel.plt : {
-		*(.rel.plt);
-	}
-	/* 
-	 *.rel.dyn MUST FOLLOW IMMEDIATELY after .rel.plt 
-	 * without alignment gap or DT_REL will be broken
-	 */
-	.rel.dyn : {
-		*(.rel.*);
-	} :text
-
-	.plt : {
-		*(.plt);
-	} :text
-
-	.dynamic : {
-		*(.dynamic);
-	} :text
-
-	.dynsym : {
-		*(.dynsym);
-	} :text
-
-	.dynstr : {
-		*(.dynstr);
-	} :text
-
-	. = . + 0x1000;
-
-	.data : {
-		*(.data);
-	} :data
-
-	.data.rel : {
-                *(.data.rel);
-	} :data
-
-	.got : {
-                *(.got);
-	} :data
-	.got.plt : {
-                *(.got.plt);
-	} :data
-
-	.bss : {
-                *(COMMON);
-                *(.bss);
-	} :data
-
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		_tdata_end = .;
-	} :data
-	.tbss : {
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	_tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss));
-	
-	. = ALIGN(0x1000);
-	_heap = .;
-}
Index: uspace/app/dload/arch/ia32/start.c
===================================================================
--- uspace/app/dload/arch/ia32/start.c	(revision b678410d7e2eada8e2e3f65aaf7c4efc831777d6)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * Copyright (c) 2008 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup rtld rtld
- * @brief
- * @{
- */ 
-/**
- * @file
- */
-
-#include <loader/pcb.h>
-#include "start.h"
-
-void program_run(void *entry, pcb_t *pcb)
-{
-	asm (
-		"mov %%eax, %%edi\n"
-		"jmp *%0\n"
-		:: "m" (entry), "a" (pcb)
-	);
-}
-
-/** @}
- */
Index: uspace/app/dload/arch/mips32/Makefile.inc
===================================================================
--- uspace/app/dload/arch/mips32/Makefile.inc	(revision b678410d7e2eada8e2e3f65aaf7c4efc831777d6)
+++ 	(revision )
@@ -1,32 +1,0 @@
-#
-# Copyright (c) 2008 Jiri Svoboda
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-CFLAGS += -D__32_BITS__
-
-ARCH_SOURCES := \
-	arch/$(UARCH)/mips32.s
Index: uspace/app/dload/arch/mips32/_link.ld.in
===================================================================
--- uspace/app/dload/arch/mips32/_link.ld.in	(revision b678410d7e2eada8e2e3f65aaf7c4efc831777d6)
+++ 	(revision )
@@ -1,59 +1,0 @@
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	. = 0x60004000 + SIZEOF_HEADERS;
-	
-	.init : {
-		*(.init);
-	} :text
-	.text : {
-	        *(.text*);
-		*(.rodata*);
-	} :text
-
-	. = . + 0x4000;
-
-	.data : {
-		*(.data);
-		*(.data.rel*);
-	} :data
-
-	.got : {
-		_gp = .;
-		*(.got);
-	} :data
-
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		_tdata_end = .;
-	} :data
-	.tbss : {
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	_tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss));
-
-	.sbss : {
-		*(.scommon);
-		*(.sbss);
-	}	
-	.bss : {
-		*(.bss);
-		*(COMMON);
-	} :data
-
-	. = ALIGN(0x4000);
-	_heap = .;
-
-	/DISCARD/ : {
-		*(*);
-	}
-}
Index: uspace/app/dload/arch/mips32/mips32.s
===================================================================
--- uspace/app/dload/arch/mips32/mips32.s	(revision b678410d7e2eada8e2e3f65aaf7c4efc831777d6)
+++ 	(revision )
@@ -1,49 +1,0 @@
-#
-# Copyright (c) 2008 Jiri Svoboda
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-.text
-.section .text
-.global program_run
-.set noreorder
-
-## void program_run(void *entry_point, void *pcb);
-#
-# $a0 (=$4)	contains entry_point
-# $a1 (=$5)	contains pcb
-#
-# Jump to a program entry point
-.ent program_run
-program_run:
-	# tmp := entry_point
-	move $25, $a0
-
-	# Pass pcb to the entry point in $a0
-	move $a0, $a1
-	jr $25
-	nop
-.end
Index: uspace/app/dload/arch/ppc32/Makefile.inc
===================================================================
--- uspace/app/dload/arch/ppc32/Makefile.inc	(revision b678410d7e2eada8e2e3f65aaf7c4efc831777d6)
+++ 	(revision )
@@ -1,32 +1,0 @@
-#
-# Copyright (c) 2008 Jiri Svoboda
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-CFLAGS += -D__32_BITS__
-
-ARCH_SOURCES := \
-	arch/$(UARCH)/start.s
Index: uspace/app/dload/arch/ppc32/_link.ld.in
===================================================================
--- uspace/app/dload/arch/ppc32/_link.ld.in	(revision b678410d7e2eada8e2e3f65aaf7c4efc831777d6)
+++ 	(revision )
@@ -1,87 +1,0 @@
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	. = 0x60001000;
-
-	.init : {
-		*(.init);
-	} :text
-	.text : {
-		*(.text);
-		*(.rodata*);
-	} :text
-	
-	.rel.plt : {
-		*(.rel.plt);
-	}
-	/* 
-	 *.rel.dyn MUST FOLLOW IMMEDIATELY after .rel.plt 
-	 * without alignment gap or DT_REL will be broken
-	 */
-	.rel.dyn : {
-		*(.rel.*);
-	} :text
-
-	.dynamic : {
-		*(.dynamic);
-	} :text
-
-	.dynsym : {
-		*(.dynsym);
-	} :text
-
-	.dynstr : {
-		*(.dynstr);
-	} :text
-
-	/* data segment */
-	. = ALIGN(0x1000);
-
-	.data : {
-		*(.data);
-		*(.sdata);
-	} :data
-
-	.dynamic : {
-		*(.dynamic);
-	} :text
-
-	.dynsym : {
-		*(.dynsym);
-	} :text
-
-	.dynstr : {
-		*(.dynstr);
-	} :text
-
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		_tdata_end = .;
-	} :data
-	.tbss : {
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	_tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss));
-	.bss : {
-		*(.sbss);
-		*(COMMON);
-		*(.bss);
-	} :data
-
-	/* On ppc32 the plt section is uninitialized and must be here! */
-	.plt : {
-		*(.plt);
-	} :data
-
-	. = ALIGN(0x1000);
-	_heap = .;
-}
Index: uspace/app/dload/arch/ppc32/start.s
===================================================================
--- uspace/app/dload/arch/ppc32/start.s	(revision b678410d7e2eada8e2e3f65aaf7c4efc831777d6)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#
-# Copyright (c) 2008 Jiri Svoboda
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-.globl program_run
-
-## void program_run(void *entry_point, void *pcb);
-#
-# %r3	contains entry_point
-# %r4	contains pcb
-#
-# Jump to a program entry point
-program_run:
-	mtctr %r3
-	mr %r6, %r4	# Pass pcb to the entry point in %r6
-	bctr
Index: uspace/app/dload/dload.c
===================================================================
--- uspace/app/dload/dload.c	(revision b678410d7e2eada8e2e3f65aaf7c4efc831777d6)
+++ 	(revision )
@@ -1,120 +1,0 @@
-/*
- * Copyright (c) 2008 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup rtld rtld
- * @brief
- * @{
- */ 
-/**
- * @file
- */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <loader/pcb.h>
-#include <ipc/ipc.h>
-#include <vfs/vfs.h>
-
-/* from librtld */
-#include <rtld.h>
-#include <dynamic.h>
-#include <elf_load.h>
-#include <module.h>
-
-#include "start.h"
-
-runtime_env_t dload_re;
-
-int main(int argc, char *argv[])
-{
-	static module_t prog;
-
-	runtime_env = &dload_re;
-
-	DPRINTF("Hello, world! (from dload)\n");
-	if (__pcb->dynamic == NULL) {
-		printf("This is the dynamic loader. It is not supposed "
-		    "to be executed directly.\n");
-		return -1;
-	}
-
-	/*
-	 * First we need to process dynamic sections of the executable
-	 * program and insert it into the module graph.
-	 */
-
-	DPRINTF("Parse program .dynamic section at %p\n", __pcb->dynamic);
-	dynamic_parse(__pcb->dynamic, 0, &prog.dyn);
-	prog.bias = 0;
-	prog.dyn.soname = "[program]";
-
-	/* Initialize list of loaded modules */
-	list_initialize(&runtime_env->modules_head);
-	list_append(&prog.modules_link, &runtime_env->modules_head);
-
-	/* Pointer to program module. Used as root of the module graph. */
-	runtime_env->program = &prog;
-
-	/* Work around non-existent memory space allocation. */
-	runtime_env->next_bias = 0x1000000;
-
-	/*
-	 * Now we can continue with loading all other modules.
-	 */
-
-	DPRINTF("Load all program dependencies\n");
-	module_load_deps(&prog);
-
-	/*
-	 * Now relocate/link all modules together.
-	 */
-
-	/* Process relocations in all modules */
-	DPRINTF("Relocate all modules\n");
-	modules_process_relocs(&prog);
-
-	/* Pass runtime evironment pointer through PCB. */
-	__pcb->rtld_runtime = (void *) runtime_env;
-
-	/*
-	 * Finally, run the main program.
-	 */
-	DPRINTF("Run program.. (at %p)\n", __pcb->entry);
-
-#ifndef RTLD_DEBUG
-	ipc_hangup(fphone(stdout));
-#endif
-	program_run(__pcb->entry, __pcb);
-
-	/* not reached */
-	return 0;
-}
-
-/** @}
- */
Index: uspace/app/dload/include/start.h
===================================================================
--- uspace/app/dload/include/start.h	(revision b678410d7e2eada8e2e3f65aaf7c4efc831777d6)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/*
- * Copyright (c) 2011 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup init
- * @{
- */
-/**
- * @file
- */
-
-#ifndef _DLOAD_START_H
-#define _DLOAD_START_H
-
-void program_run(void *entry, pcb_t *pcb);
-
-#endif
-
-/** @}
- */
