This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- unify interface to platform specific section handling - static executables have a single SectionGroup - each shared library adds another SectionGroup - use new DSO code for ModuleInfos
- Loading branch information
1 parent
37f9bd2
commit 0e10e7e
Showing
12 changed files
with
567 additions
and
189 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* | ||
* Copyright: Copyright Digital Mars 2000 - 2012. | ||
* License: Distributed under the | ||
* $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0). | ||
* (See accompanying file LICENSE) | ||
* Authors: Walter Bright, Sean Kelly, Martin Nowak | ||
* Source: $(DRUNTIMESRC src/rt/_sections.d) | ||
*/ | ||
|
||
module rt.sections; | ||
|
||
version (linux) | ||
public import rt.sections_linux; | ||
else version (FreeBSD) | ||
public import rt.sections_freebsd; | ||
else version (OSX) | ||
public import rt.sections_osx; | ||
else version (Win32) | ||
public import rt.sections_win32; | ||
else version (Win64) | ||
public import rt.sections_win64; | ||
else | ||
static assert(0, "unimplemented"); | ||
|
||
import rt.minfo; | ||
|
||
template isSectionGroup(T) | ||
{ | ||
enum isSectionGroup = | ||
is(typeof(T.init.modules) == ModuleInfo*[]) && | ||
is(typeof(T.init.moduleGroup) == ModuleGroup) && | ||
is(typeof({ foreach (ref T; T) {}})) && | ||
is(typeof({ foreach_reverse (ref T; T) {}})); | ||
} | ||
static assert(isSectionGroup!(SectionGroup)); | ||
static assert(is(typeof(&initSections) == void function())); | ||
static assert(is(typeof(&finiSections) == void function())); |
Oops, something went wrong.