[D-runtime] [D-Programming-Language/druntime] 73d067: low-level implementation of dynamic loading

GitHub noreply at github.com
Fri Sep 6 20:44:19 PDT 2013


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/druntime
  Commit: 73d067fd04ed8c9588c5ae09ebe48fdb1b528793
      https://github.com/D-Programming-Language/druntime/commit/73d067fd04ed8c9588c5ae09ebe48fdb1b528793
  Author: Martin Nowak <code at dawg.eu>
  Date:   2013-09-06 (Fri, 06 Sep 2013)

  Changed paths:
    M posix.mak
    M src/core/runtime.d
    M src/core/thread.d
    M src/rt/dmain2.d
    M src/rt/sections.d
    M src/rt/sections_linux.d
    M src/rt/util/container.d

  Log Message:
  -----------
  low-level implementation of dynamic loading

- implement rt_loadLibrary/rt_unloadLibrary in src/rt/sections_linux.d
- keep hashmap from link_map* to DSO* structs to gather library
  dependencies and perform thread initialization
- thread local reference count to trigger TLS ctors/dtors
- add core.thread interface to inherit loaded libraries when spawning
  a new Thread
- make dynamic loading functions only available for version (Shared)
- set -version=Shared when building a shared druntime
- loading a shared library when statically linking against druntime
  will cause a link error
- Runtime.loadLibrary and Runtime.unloadLibrary are templated so that
  they are only linked when actually used
- the static libphobos2.a does not depends on libdl


  Commit: ef1c16744d36c44b9ad86b028a7df15147064042
      https://github.com/D-Programming-Language/druntime/commit/ef1c16744d36c44b9ad86b028a7df15147064042
  Author: Martin Nowak <code at dawg.eu>
  Date:   2013-09-06 (Fri, 06 Sep 2013)

  Changed paths:
    M posix.mak
    A test/shared/.gitignore
    A test/shared/Makefile
    A test/shared/src/lib.d
    A test/shared/src/link.d
    A test/shared/src/load.d

  Log Message:
  -----------
  add unittests for shared libraries

- test EH, GC, init/fini and ModuleInfos for linked and loaded D libraries


  Commit: 8b19ff6a43ecb5a484ad14f7393fe40ea63be6c5
      https://github.com/D-Programming-Language/druntime/commit/8b19ff6a43ecb5a484ad14f7393fe40ea63be6c5
  Author: Martin Nowak <code at dawg.eu>
  Date:   2013-09-06 (Fri, 06 Sep 2013)

  Changed paths:
    M test/shared/Makefile
    M test/shared/src/lib.d
    A test/shared/src/linkD.c
    A test/shared/src/linkDR.c
    A test/shared/src/loadDR.c

  Log Message:
  -----------
  add C tests

- linkD - links a D library
- loadD - links druntime, loads a D library
- loadDR - loads druntime, loads a D library


  Commit: 34242013ac09228c1b9597b21bcf7725a2bf0781
      https://github.com/D-Programming-Language/druntime/commit/34242013ac09228c1b9597b21bcf7725a2bf0781
  Author: Martin Nowak <code at dawg.eu>
  Date:   2013-09-06 (Fri, 06 Sep 2013)

  Changed paths:
    M test/shared/Makefile
    A test/shared/src/liblinkdep.d
    A test/shared/src/libloaddep.d
    A test/shared/src/link_linkdep.d
    A test/shared/src/link_loaddep.d
    A test/shared/src/load_linkdep.d
    A test/shared/src/load_loaddep.d

  Log Message:
  -----------
  add tests with dependent libraries


  Commit: 2c0dc6596eaa9d4730b9ad7e1dccf3aa30603ce5
      https://github.com/D-Programming-Language/druntime/commit/2c0dc6596eaa9d4730b9ad7e1dccf3aa30603ce5
  Author: Martin Nowak <code at dawg.eu>
  Date:   2013-09-06 (Fri, 06 Sep 2013)

  Changed paths:
    M test/shared/Makefile
    A test/shared/src/host.c
    A test/shared/src/plugin.d

  Log Message:
  -----------
  add test for C host with D plugins


  Commit: ccad8ffc70b374206188f6e3dc36436b094df42f
      https://github.com/D-Programming-Language/druntime/commit/ccad8ffc70b374206188f6e3dc36436b094df42f
  Author: Walter Bright <walter at walterbright.com>
  Date:   2013-09-06 (Fri, 06 Sep 2013)

  Changed paths:
    M posix.mak
    M src/core/runtime.d
    M src/core/thread.d
    M src/rt/dmain2.d
    M src/rt/sections.d
    M src/rt/sections_linux.d
    M src/rt/util/container.d
    A test/shared/.gitignore
    A test/shared/Makefile
    A test/shared/src/host.c
    A test/shared/src/lib.d
    A test/shared/src/liblinkdep.d
    A test/shared/src/libloaddep.d
    A test/shared/src/link.d
    A test/shared/src/linkD.c
    A test/shared/src/linkDR.c
    A test/shared/src/link_linkdep.d
    A test/shared/src/link_loaddep.d
    A test/shared/src/load.d
    A test/shared/src/loadDR.c
    A test/shared/src/load_linkdep.d
    A test/shared/src/load_loaddep.d
    A test/shared/src/plugin.d

  Log Message:
  -----------
  Merge pull request #593 from dawgfoto/dynamicLoading

dynamic loading


Compare: https://github.com/D-Programming-Language/druntime/compare/842c0cd906b5...ccad8ffc70b3


More information about the D-runtime mailing list