]> git.ipfire.org Git - thirdparty/gcc.git/blob - libphobos/libdruntime/gcc/sections/package.d
Update copyright years.
[thirdparty/gcc.git] / libphobos / libdruntime / gcc / sections / package.d
1 // Run-time support for retrieving platform-specific sections.
2 // Copyright (C) 2019-2022 Free Software Foundation, Inc.
3
4 // GCC is free software; you can redistribute it and/or modify it under
5 // the terms of the GNU General Public License as published by the Free
6 // Software Foundation; either version 3, or (at your option) any later
7 // version.
8
9 // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
10 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 // for more details.
13
14 // Under Section 7 of GPL version 3, you are granted additional
15 // permissions described in the GCC Runtime Library Exception, version
16 // 3.1, as published by the Free Software Foundation.
17
18 // You should have received a copy of the GNU General Public License and
19 // a copy of the GCC Runtime Library Exception along with this program;
20 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
21 // <http://www.gnu.org/licenses/>.
22
23 module gcc.sections;
24
25 version (CRuntime_Glibc) version = SectionsElf;
26 version (CRuntime_Musl) version = SectionsElf;
27 version (CRuntime_UClibc) version = SectionsElf;
28 version (FreeBSD) version = SectionsElf;
29 version (NetBSD) version = SectionsElf;
30 version (OpenBSD) version = SectionsElf;
31 version (DragonFlyBSD) version = SectionsElf;
32 version (Solaris) version = SectionsElf;
33 version (OSX) version = SectionsMacho;
34 version (Windows) version = SectionsPeCoff;
35
36 version (SectionsElf)
37 public import gcc.sections.elf;
38 else version (SectionsMacho)
39 public import gcc.sections.macho;
40 else version (SectionsPeCoff)
41 public import gcc.sections.pecoff;
42 else
43 static assert(0, "unimplemented");
44
45 version (Shared)
46 {
47 // interface for core.thread to inherit loaded libraries
48 void* pinLoadedLibraries() nothrow @nogc;
49 void unpinLoadedLibraries(void* p) nothrow @nogc;
50 void inheritLoadedLibraries(void* p) nothrow @nogc;
51 void cleanupLoadedLibraries() nothrow @nogc;
52 }