]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libphobos/libdruntime/gcc/sections/package.d
libphobos: Add section support code for MACHO and PE/COFF
[thirdparty/gcc.git] / libphobos / libdruntime / gcc / sections / package.d
index fdaf039fcfa43be0800e2e484072c7bd597a4a10..4c2b542df2386d00eceb44ddb34b34aba355ba0d 100644 (file)
 
 module gcc.sections;
 
-version (CRuntime_Glibc)
-    public import gcc.sections.elf_shared;
-else version (CRuntime_Musl)
-    public import gcc.sections.elf_shared;
-else version (CRuntime_UClibc)
-    public import gcc.sections.elf_shared;
-else version (FreeBSD)
-    public import gcc.sections.elf_shared;
-else version (NetBSD)
-    public import gcc.sections.elf_shared;
-else version (DragonFlyBSD)
-    public import gcc.sections.elf_shared;
-else version (Solaris)
-    public import gcc.sections.elf_shared;
-else version (OSX)
-    public import gcc.sections.osx;
-else version (CRuntime_DigitalMars)
-    public import gcc.sections.win32;
-else version (CRuntime_Microsoft)
-    public import gcc.sections.win64;
-else version (CRuntime_Bionic)
-    public import gcc.sections.android;
+version (CRuntime_Glibc)  version = SectionsElf;
+version (CRuntime_Musl)   version = SectionsElf;
+version (CRuntime_UClibc) version = SectionsElf;
+version (FreeBSD)         version = SectionsElf;
+version (NetBSD)          version = SectionsElf;
+version (DragonFlyBSD)    version = SectionsElf;
+version (Solaris)         version = SectionsElf;
+version (OSX)             version = SectionsMacho;
+version (Windows)         version = SectionsPeCoff;
+
+version (SectionsElf)
+    public import gcc.sections.elf;
+else version (SectionsMacho)
+    public import gcc.sections.macho;
+else version (SectionsPeCoff)
+    public import gcc.sections.pecoff;
 else
     static assert(0, "unimplemented");
+
+version (Shared)
+{
+    // interface for core.thread to inherit loaded libraries
+    void* pinLoadedLibraries() nothrow @nogc;
+    void unpinLoadedLibraries(void* p) nothrow @nogc;
+    void inheritLoadedLibraries(void* p) nothrow @nogc;
+    void cleanupLoadedLibraries() nothrow @nogc;
+}