October 18, 2012 [dmd-internals] [D-Programming-Language/dmd] 313132: new runtime registration for executables and share... | ||||
---|---|---|---|---|
| ||||
Attachments:
| Branch: refs/heads/master Home: https://github.com/D-Programming-Language/dmd Commit: 313132b6e20c119fa64c6164574818421cb522ce https://github.com/D-Programming-Language/dmd/commit/313132b6e20c119fa64c6164574818421cb522ce Author: Martin Nowak <dawg@dawgfoto.de> Date: 2012-10-18 (Thu, 18 Oct 2012) Changed paths: M src/backend/elfobj.c M src/backend/melf.h Log Message: ----------- new runtime registration for executables and shared libraries - Put ModuleInfos and EH tables in bracketed sections. This works because the linker will preserve the order of first occurence for non-standard sections. Use local zero sized symbols as brackets to refer to the start and end. - Pass ModuleInfos along with EH tables to a new druntime function _d_dso_registry. We output a function, a ctor entry, a dtor entry and a local data record in a COMDAT section group. The linker will merge multiple occurences per executable/shared library, thus resulting in only one registration. - We can't create brackets for .bss, .data, .tbss and .tdata as these sections are already known to the linker. Thus it would merge input sections in link order. Creating custom input sections for those is not desirable because COMDAT through section prefixes (.data.TypeInfo) won't get merged into a single output section. The needed segments can be obtained by reading the program headers. - Until REQUIRE_DSO_REGISTRY is set in elfobj.c any generated object remains compatible with the old mechanism that uses global bracket symbols. Commit: d64c579ea87b9c4f511b13a2a0bcc109ce1f7f1b https://github.com/D-Programming-Language/dmd/commit/d64c579ea87b9c4f511b13a2a0bcc109ce1f7f1b Author: dawg <dawg@dawgfoto.de> Date: 2012-10-18 (Thu, 18 Oct 2012) Changed paths: M test/runnable/testthread.d Log Message: ----------- fix TLS layout in test Commit: a1cda0731007443b893efd26fb51f54efb8e1f1d https://github.com/D-Programming-Language/dmd/commit/a1cda0731007443b893efd26fb51f54efb8e1f1d Author: Walter Bright <walter@walterbright.com> Date: 2012-10-18 (Thu, 18 Oct 2012) Changed paths: M src/backend/elfobj.c M src/backend/melf.h M test/runnable/testthread.d Log Message: ----------- Merge pull request #1043 from dawgfoto/SharedRuntime new runtime registration for executables and shared libraries Compare: https://github.com/D-Programming-Language/dmd/compare/881f9fcb7405...a1cda0731007 |
October 19, 2012 Re: [dmd-internals] [D-Programming-Language/dmd] 313132: new runtime registration for executables and share... | ||||
---|---|---|---|---|
| ||||
Posted in reply to GitHub Attachments:
|
On Oct 19, 2012, at 05:53 AM, GitHub <noreply@github.com> wrote:
> Branch: refs/heads/master
> Home: https://github.com/D-Programming-Language/dmd
> Commit: 313132b6e20c119fa64c6164574818421cb522ce
> https://github.com/D-Programming-Language/dmd/commit/313132b6e20c119fa64c6164574818421cb522ce
> Author: Martin Nowak <dawg@dawgfoto.de>
> Date: 2012-10-18 (Thu, 18 Oct 2012)
>
> Changed paths:
> M src/backend/elfobj.c
> M src/backend/melf.h
>
> Log Message:
> -----------
> new runtime registration for executables and shared libraries
Is this what it looks like, a start of supporting dynamic libraries?
--
/Jacob Carlborg
|
Copyright © 1999-2021 by the D Language Foundation