Opened 15 years ago

Closed 13 years ago

#56 closed enhancement (fixed)

Finish and merge the dynamic loader to trunk

Reported by: Jakub Jermář Owned by: Jiri Svoboda
Priority: major Milestone: 0.5.0
Component: helenos/unspecified Version: mainline
Keywords: dynload, thesis Cc:
Blocker for: Depends on:
See also:


This ticket is created to track progress on merging the dynamic loader to trunk.

Change History (6)

comment:1 by Jiri Svoboda, 15 years ago

I brought the dynload branch in sync with trunk (it was lagging behind by some 700 changesets).
ia32 works well, although non static thread-local vars are still not supported (this concerns two variables in the C library, which are marked static in dynload, but not in trunk). ppc32 and mips32 still only pass dltest2 (call a dlsym-resloved function) but not dltest (shared C library).

comment:2 by Jakub Jermář, 14 years ago

Component: unspecified
Keywords: thesis added

comment:3 by Jakub Jermář, 13 years ago


comment:4 by Jakub Jermář, 13 years ago

Type: taskenhancement

comment:5 by Jiri Svoboda, 13 years ago

Owner: set to Jiri Svoboda
Status: newaccepted

Merged from mainline again (the branch was left at the state when it was converted from Subversion to Bazaar). Since the Makefiles have changed completely, I need to re-implement building of shared libraries. The system now compiles (if you disable Build shared C library) but unless you supply a fake it won't build the ISO image.

The common user space Makefile now must be taught how to build shared libraries (and how to link against them).

comment:6 by Jiri Svoboda, 13 years ago

Resolution: fixed
Status: acceptedclosed

Dynamic linking support merged in changeset:mainline,937. Two years too late, but better than never, right?

Merge notes: Dynamic linking is disabled by default. It can be enabled only on ia32 by setting CONFIG_RTLD = y, CONFIG_BUILD_SHARED_LIBS = y, CONFIG_USE_SHARED_LIBS = y.

Makefiles for executables that are init-binaries must set STATIC_NEEDED = y. Makefiles for executables that cannot be dynamically linked must set STATIC_ONLY = y.

TLS support is limited. Only the C library can use TLS and all thread-local variables must be static. Example: icmp uses thread-local variables and thus it sets STATIC_ONLY = y.

Currently shared versions of lib/c and lib/softint will be built (if CONFIG_BUILD_SHARED_LIBS = y) and all executables except init-binaries (STATIC_NEEDED = y) and icmp (STATIC_ONLY = y) will link against them. Shared variants of other libs can be built easily, but need a little more makefile work to link against them.

Note: See TracTickets for help on using tickets.