This patch simplifies the way of how Genode's base libraries are organized. Originally, the base API was implemented in the form of many small libraries such as 'thread', 'env', 'server', etc. Most of them used to consist of only a small number of files. Because those libraries are incorporated in any build, the checking of their inter-dependencies made the build process more verbose than desired. Also, the number of libraries and their roles (core only, non-core only, shared by both core and non-core) were not easy to capture. Hereby, the base libraries have been reduced to the following few libraries: - startup.mk contains the startup code for normal Genode processes. On some platform, core is able to use the library as well. - base-common.mk contains the parts of the base library that are identical by core and non-core processes. - base.mk contains the complete base API implementation for non-core processes Consequently, the 'LIBS' declaration in 'target.mk' files becomes simpler as well. In the most simple case, only the 'base' library must be mentioned. Fixes #18 |
||
---|---|---|
.. | ||
arch | ||
arm | ||
contrib | ||
include | ||
startup | ||
x86_32 | ||
x86_64 | ||
dl_extensions.h | ||
environ.cc | ||
err.cc | ||
file.cc | ||
file.h | ||
ldso_types.c | ||
ldso.ld | ||
lock.cc | ||
main.c | ||
platform.c | ||
README | ||
rtld_dummies.c | ||
stdio.cc | ||
stdlib.cc | ||
string.cc | ||
symbol.map | ||
target.inc | ||
test.cc |
This directory contains the port of the dynamic linker (ldso) from FreeBSD. Usage ----- To build a shared library instead of a regular static library, you just need to declare 'SHARED_LIB = yes' in the library-description file. When doing so, a '<libname>.lib.so' file will be generated and installed in the '<build-dir>/bin/' directory. For building an executable that uses a shared library, no special precautions are needed. The build system will automatically detect the use of shared libraries, concludes that the binary must be dynamically linked, and will use the correct linker script. When loading a dynamically linked program, the dynamic linker 'lsdo' and all used shared objects must be loaded as well. Debugging dynamic binaries with GDB stubs ----------------------------------------- ! # start GDB with binary to debug ! gdb <path to binary> ! ! # break in main routine ! b main ! ! # inspect loaded shared libraries ! info sharedlibrary ! ! # load shared symbols of shared libaries ! share ! ! # from here you can debug within libraries :Known issues: GDB 7.2 has a regression bug in its line information parser. These issue has been fixed with version 7.3.