genode/repos/os/src/lib/ldso/README

39 lines
1.2 KiB
Plaintext
Raw Normal View History

2011-12-22 16:19:25 +01:00
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.