lx_hybrid: reserve thread context area for core

core does not use POSIX threads when built for the 'lx_hybrid_x86'
platform, so we need to reserve the thread-context area via a segment in
the program to prevent clashes with vdso and shared libraries.

Fixes #639.
This commit is contained in:
Christian Prochaska 2013-02-03 02:43:31 +01:00 committed by Norman Feske
parent 5fff9eb860
commit 8f12e555af
2 changed files with 11 additions and 1 deletions

View File

@ -13,7 +13,7 @@ LD_TEXT_ADDR ?= 0x01000000
LD_SCRIPT_STATIC = $(call select_from_repositories,src/platform/genode.ld) \
$(call select_from_repositories,src/platform/context_area.nostdlib.ld)
else
LD_SCRIPT_STATIC =
LD_SCRIPT_STATIC ?=
endif
ifneq ($(filter hardening_tool_chain, $(SPECS)),)

View File

@ -31,6 +31,16 @@ INC_DIR += $(REP_DIR)/src/core/include \
HOST_INC_DIR += /usr/include
#
# core does not use POSIX threads when built for the 'lx_hybrid_x86' platform,
# so we need to reserve the thread-context area via a segment in the program to
# prevent clashes with vdso and shared libraries.
#
ifeq ($(findstring always_hybrid, $(SPECS)), always_hybrid)
LD_SCRIPT_STATIC = $(LD_SCRIPT_DEFAULT) \
$(call select_from_repositories,src/platform/context_area.stdlib.ld)
endif
vpath main.cc $(GEN_CORE_DIR)
vpath thread.cc $(BASE_DIR)/src/base/thread
vpath ram_session_component.cc $(GEN_CORE_DIR)