diff --git a/base-hw/lib/mk/arm/startup.mk b/base-hw/lib/mk/arm/startup.mk deleted file mode 100755 index 715f95ff5b..0000000000 --- a/base-hw/lib/mk/arm/startup.mk +++ /dev/null @@ -1,10 +0,0 @@ -# -# \brief Linked against any program expect LDSO and dynamic binaries -# \author Martin Stein -# \date 2012-04-16 -# - -include $(BASE_DIR)/lib/mk/startup.inc - -vpath crt0.s $(REP_DIR)/src/platform/arm - diff --git a/base-hw/src/base/thread_support.cc b/base-hw/src/base/thread_support.cc index e917027cde..dc53e774ae 100644 --- a/base-hw/src/base/thread_support.cc +++ b/base-hw/src/base/thread_support.cc @@ -19,7 +19,7 @@ using namespace Genode; -extern Native_utcb * _main_utcb; +extern Native_utcb * __initial_sp; namespace Genode { Rm_session *env_context_area_rm_session(); } @@ -31,7 +31,7 @@ namespace Genode { Rm_session *env_context_area_rm_session(); } Native_utcb * Thread_base::utcb() { /* this is a main thread, so CRT0 provides UTCB through '_main_utcb' */ - if (!this) return _main_utcb; + if (!this) return __initial_sp; /* otherwise we have a valid thread base */ return &_context->utcb; diff --git a/base-hw/src/platform/arm/crt0.s b/base-hw/src/platform/arm/crt0.s deleted file mode 100644 index dba4a8adce..0000000000 --- a/base-hw/src/platform/arm/crt0.s +++ /dev/null @@ -1,53 +0,0 @@ - -/** - * \brief Startup code for Genode programs on Cortex A9 - * \author Martin Stein - * \date 2011-10-01 - */ - -/* - * Copyright (C) 2012-2013 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU General Public License version 2. - */ - -.section .text - - /* ELF entry symbol */ - .global _start - _start: - - /* fetch thread-entry arguments to their destinations in BSS */ - ldr r0, =_main_utcb - str sp, [r0] - - /* call _main routine */ - ldr sp, =_stack_high - .extern _main - bl _main - 1: b 1b - - /* dynamic symbol object handle */ - .p2align 2 - .global __dso_handle - __dso_handle: .long 0 - - .global __initial_sp - __initial_sp: .long 0 - -.section .bss - - /* main-thread stack */ - .p2align 2 - .global _stack_low - _stack_low: - .space 64*1024 - .global _stack_high - _stack_high: - - /* main-thread UTCB-pointer for the Genode thread-API */ - .p2align 2 - .global _main_utcb - _main_utcb: .long 0 -