Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 11 years ago

Closed 9 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:

Description

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

Change History (6)

comment:1 Changed 11 years ago by Jiri Svoboda

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 Changed 10 years ago by Jakub Jermář

Component: unspecified
Keywords: thesis added

comment:3 Changed 9 years ago by Jakub Jermář

Milestone: 0.5.00.5.1

comment:4 Changed 9 years ago by Jakub Jermář

Type: taskenhancement

comment:5 Changed 9 years ago by Jiri Svoboda

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 libtest.so 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 Changed 9 years ago by Jiri Svoboda

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.