mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-20 08:03:56 +00:00
linux: stack-area handling with recent Linux kernels
We moved the stack-area segment 128 MiB behind text and data to comply with assumptions in the kernel ELF loader. This commit also reenables static binaries on linux and removes the unused stack_area.stdlib.ld script. Fixes #2521
This commit is contained in:
@ -18,10 +18,17 @@ PHDRS
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = 0x40000000;
|
||||
_stack_area_start = .;
|
||||
/*
|
||||
* Since Linux loads ldso page aligned, we align the stack area after
|
||||
* The virtual gap between start of text segment (0x0) and stack area
|
||||
* must be sufficiently large to hold either the entire dynamic linker (text +
|
||||
* data) or core (0x1000000 + text + data). Note, core-linux includes 80 MiB
|
||||
* core-local memory in the BSS.
|
||||
*/
|
||||
. = 0x8000000; /* 128 MiB */
|
||||
_stack_area_start = .;
|
||||
|
||||
/*
|
||||
* Since Linux loads ldso page-aligned, we align the stack area after
|
||||
* loading to a 1 MiB boundary, therefore we reserve one MiB more here.
|
||||
*/
|
||||
.stack_area : { . += 0x10100000; } : stack_area
|
@ -1,19 +0,0 @@
|
||||
/*
|
||||
* \brief Linux-specific linker script additions (STDLIB = yes)
|
||||
* \author Christian Helmuth
|
||||
* \date 2010-09-22
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2010-2017 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = 0x40000000;
|
||||
_stack_area_start = .;
|
||||
.stack_area : { . += 0x10000000; }
|
||||
}
|
Reference in New Issue
Block a user