forked from D-Programming-GDC/gdc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement shared library support in druntime
- Loading branch information
Showing
16 changed files
with
1,783 additions
and
432 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #include <stddef.h> | ||
|
|
||
| typedef struct | ||
| { | ||
| size_t _version; // currently 1 | ||
| void** _slot; // can be used to store runtime data | ||
| void** _minfo_beg, **_minfo_end; // array of modules in this object file | ||
| void* _deh_beg, *_deh_end; // array of exception handling data | ||
| } CompilerDSOData; | ||
|
|
||
| void _d_dso_registry(CompilerDSOData* data); | ||
| extern void* __start_dminfo; | ||
| extern void* __stop_dminfo; | ||
|
|
||
| static void* slot; | ||
|
|
||
| __attribute__ ((constructor, destructor, used)) static void _dso_start() | ||
| { | ||
| CompilerDSOData data; | ||
| data._version = 1; | ||
| data._slot = &slot; | ||
| data._minfo_beg = &__start_dminfo; | ||
| data._minfo_end = &__stop_dminfo; | ||
| data._deh_beg = NULL; | ||
| data._deh_end = NULL; | ||
| _d_dso_registry(&data); | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.