Commit Graph

958 Commits

Author SHA1 Message Date
af9b91e94c Make out and dev output paths more explicit 2019-11-20 20:25:16 +01:00
c6c7870a29 Fix bad include path in genode-base.pc
Add the top-level of include to the search path, not include/base.
2019-11-14 08:56:19 +01:00
c2a543ed20 test/log: exit when complete 2019-11-10 13:40:40 +01:00
1dc25293b8 Startup library header path must be overriden
The startup library might fail at runtime if local headers are included
rather than headers from somewhere else.
2019-10-28 15:25:18 +01:00
3bf1cc09eb Move startup library to a Tup group 2019-10-28 11:32:29 +01:00
be04cfe899 Remove spec_includes replacements from pkg-config 2019-10-28 11:32:29 +01:00
c67d81dc99 Tup: rename INCLUDES to CPPFLAGS 2019-10-28 11:32:29 +01:00
3c8117e555 Clang: uninitialized 2019-10-28 11:32:29 +01:00
a7a0d3fe63 Refactor Tup, flatten output directories
Make no attempt to replicate the depot layout.
2019-10-28 11:32:29 +01:00
d348e96b84 base-common: copy all sparse ELF segments, including read-only 2019-10-28 11:32:29 +01:00
5e87eee9b8 Genode::Capability_space: bypass static constructor where possible 2019-10-04 00:52:03 +02:00
6e9f9ce3a8 Core includes untangling
Express convoluted include walks directly in code, do not hide them
in build scripts.
2019-10-04 00:52:02 +02:00
5587f0992b Tup: build static libraries into the dev output 2019-10-04 00:52:02 +02:00
5682ad8e2b Add base tests 2019-10-04 00:52:02 +02:00
7d384bc3e6 Adjust for Nix environment
Use a LIBUNWIND and LIBUNWIND_BAREMETAL, adjust shell.nix to use
"base" from the  new split repository builds.
2019-10-04 00:52:02 +02:00
5a8686eaf9 Compatibility with LLVM libunwind 2019-10-04 00:52:02 +02:00
075ab46d39 Clang: do not use angle brackets for local includes 2019-10-04 00:47:17 +02:00
44f2c86a91 Clang: implement memset local to C++ runtime
Using Genode::memset with Clang results in recursion.
2019-10-03 22:06:34 +02:00
2d60fc9f65 Clang: do not link with libgcc.a 2019-10-03 21:57:57 +02:00
54480c1c3d GCC: Ignore Clang pragmas 2019-10-03 21:57:57 +02:00
2509d95d98 Clang: uninitialized 2019-10-03 21:57:57 +02:00
e3c285ac0c Clang: maybe_unused 2019-10-03 21:57:57 +02:00
ca98ac2a0f Clang: no null references 2019-10-03 21:57:57 +02:00
8979b7ffbb Clang: more C++ support includes 2019-10-03 21:57:57 +02:00
28eb528148 Clang: add [[maybe_unused]] to Lock::Guards 2019-10-03 21:57:57 +02:00
e46099e224 Clang: disable some RPC tracing
Clang cannot handle this much template salad.
2019-10-03 21:57:57 +02:00
c770a8b9ec Clang: remove unused 2019-10-03 21:57:57 +02:00
30700e179a Clang: reconcile struct and class declarations 2019-10-03 21:25:37 +02:00
59ab4ef6bc Tupify
Implement a graph-based build system.
2019-10-03 21:25:36 +02:00
4952b37e4c Core: exit with child exit value
Effective for base-linux only.
2019-10-03 21:25:36 +02:00
Christian Helmuth
4a7b0e99a6 depot: update recipe hashes 2019-09-20 14:14:16 +02:00
Christian Helmuth
08aa7d310a Increase stack size in thread test for arm_v8a
It seems throwing an exception on arm_v8a needs a significant amount of
stack space (> 2048 bytes).
2019-09-03 12:12:46 +02:00
Christian Prochaska
ab017607a2 tool chain: TLS support
Fixes #3418
2019-09-02 16:29:33 +02:00
Christian Helmuth
b2c59576ae depot: update recipe hashes 2019-08-28 14:36:56 +02:00
Norman Feske
66d5359d75 ldso: heuristics for libs needed during execve
The allocation of regions within the linker area is normally left to the
best-fit 'Allocator_avl', which happens to populate the linker area
starting with the binary followed by all loaded libraried with no gaps
in between.

When replacing the binary during execve, however, we need to ensure that
the new binary does not conflict with any library that stays resident
during execve. This patch tweaks the linker's region allocation scheme
such that these libraries are placed at the end of the linker area.

Issue #3481
2019-08-28 14:18:45 +02:00
Norman Feske
fa48054959 ldso: Dynamic_linker::respawn mechanism
This patch extends the interface of the dynamic linker with the ability
to replace the running binary executable by another one. It is
designated for the implementation of execve. The interface consists of
two new functions.

'Dynamic_linker::keep' marks the specified shared object as unloadable.
This can be used to pin a set of libraries (i.e., the libc) within the
local address space while replacing the binary and other higher-level
libraries.

'Dynamic_linker::respawn' unloads the current binary, loads the one
specifed as first argument, and looks up the entry point symbol of the
new binary, which would be "main" for POSIX programs.

In addition to implementing the new interface, the patch adjusts the
linker at various places that previously assumed the binary to be
constant over runtime.

Issue #3481
2019-08-28 14:18:45 +02:00
Norman Feske
a98f78afd9 ldso: avoid 'dd' output in build log
This patch is a follow-up commit for "ld: load dynamic linker at static
address on Linux". It suppresses the stderr output of 'dd' when marking
the ELF binary as executable.

Issue #3479
2019-08-28 14:18:45 +02:00
Norman Feske
3c6fe6e741 ldso: statically allocate initial heap block
This patch enables the fork.run script to run on base-linux. It should
be regarded as an interim solution, however, because the randomization
performed by the Linux kernel may still - by chance - produce a
situation where one of the libc's malloc heap regions intersects with
another dataspace dynamically attached to the child.

The better solution would be to make the 'Region_map_mmap'
implementation not depend on the kernel's allocation policy by using a
locally implemented allocator.

Issue #3478
2019-08-28 14:18:45 +02:00
Norman Feske
354e310c87 heap: interface for obtaining backing-store info
The new 'Heap::for_each_region' method provides information about the
heap's used virtual-memory regions. This method allows for the
mirroring of the heap state as needed by 'fork'.

Issue #3478
2019-08-28 14:18:44 +02:00
Norman Feske
2cff12e1fb base: remove debug message 2019-08-28 14:18:44 +02:00
Norman Feske
55e99e16ef base: add missing include in base/id_space.h 2019-08-28 14:18:44 +02:00
Norman Feske
e499a04de7 ldso: config option to disarm ctors check
By specifying the config attribute 'check_ctors="no"', the dynamic
linker won't abort the program on a missing call of
'Env::exec_static_constructors'. This is the case for forked programs
where the ctors were already executed by the forking program prior the
fork operation.

Issue #3478
2019-08-28 14:18:44 +02:00
Norman Feske
abdf422681 ldso: interface to get infos about loaded objects
This patch enhances the 'base/shared_object.h' interface of the dynamic
linker with the function 'for_each_loaded_object', which allows the
caller to obtain information about the currently loaded binary and
shared libraries.

The new interface is a base mechanism needed for implementing 'fork' in
the libc.

Issue #3478
2019-08-21 14:08:18 +02:00
Norman Feske
b113f869bb Use I/O signals for resource-request responses 2019-08-21 13:39:44 +02:00
Norman Feske
6fb7022508 Cap-resource request on Pd_session::transfer_quota
This patch handles the case where a PD's cap quota becomes exhausted
on the attempt to transfer caps via 'Env::pd().transfer_quota'. The
solution mirrors the existing code for RAM quota.

Prior this patch, the 'transfer_quota' operation would trigger an
'Out_of_caps' exception.
2019-08-21 13:38:24 +02:00
Christian Helmuth
312f801f8a depot: update recipe hashes 2019-08-21 13:25:26 +02:00
Sebastian Sumpf
2fc6cedcc0 ld: load dynamic linker at static address on Linux
* move stack area to static address at beginning of binary
* set ELF type of linker from shared to executable

fixes #3479
2019-08-21 13:25:25 +02:00
Sebastian Sumpf
f3a7d3750f base: Add Linux and GOT relative startup code on ARM
* Linux specific startup code for base-linux ARM
* load symbols global offset table relative in order to avoid text
  relocations

issue #3466
2019-08-21 13:25:25 +02:00
Johannes Kliemann
1bdd18a196 ada-runtime: update to 1.1 2019-08-21 13:25:25 +02:00
Christian Prochaska
85b1563e57 mk: generate .data symbols with distinct values/addresses
Prevent the static linker from assuming weak object symbols to be alias
symbols for unrelated non-weak symbols with the same value/address.

Fixes #3458
2019-08-21 12:37:01 +02:00