xref: /netbsd-src/external/gpl3/gcc/dist/libphobos/libdruntime/core/sys/darwin/mach/dyld.d (revision 0a3071956a3a9fdebdbf7f338cf2d439b45fc728)
1 /**
2  * Copyright: Copyright Digital Mars 2010.
3  * License:   $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
4  * Authors:   Jacob Carlborg
5  * Version: Initial created: Feb 20, 2010
6  */
7 
8 /*          Copyright Digital Mars 2010.
9  * Distributed under the Boost Software License, Version 1.0.
10  *    (See accompanying file LICENSE or copy at
11  *          http://www.boost.org/LICENSE_1_0.txt)
12  */
13 module core.sys.darwin.mach.dyld;
14 
15 version (OSX)
16     version = Darwin;
17 else version (iOS)
18     version = Darwin;
19 else version (TVOS)
20     version = Darwin;
21 else version (WatchOS)
22     version = Darwin;
23 
24 version (Darwin):
25 extern (C):
26 nothrow:
27 @nogc:
28 
29 public import core.stdc.stdint; // for intptr_t
30 public import core.sys.darwin.mach.loader;
31 
32 uint         _dyld_image_count();
33 const(char)* _dyld_get_image_name(uint image_index);
34 mach_header* _dyld_get_image_header(uint image_index);
35 intptr_t     _dyld_get_image_vmaddr_slide(uint image_index);
36 
37 void         _dyld_register_func_for_add_image(void function(const scope mach_header* mh, intptr_t vmaddr_slide));
38 void         _dyld_register_func_for_remove_image(void function(const scope mach_header* mh, intptr_t vmaddr_slide));
39 
40 int NSVersionOfRunTimeLibrary(const char* libraryPath);
41 int NSVersionOfLinkTimeLibrary(const char* libraryPath);
42 int _NSGetExecutablePath(char* buf, uint* bufsize);
43