SYNOPSIS
#include <mach-o/dyld.h>
bool _dyld_present(void);
uint32_t _dyld_image_count(void);
const struct mach_header *_dyld_get_image_header(
uint32_t image_index);
intptr_t _dyld_get_image_vmaddr_slide(
uint32_t image_index);
const char *_dyld_get_image_name(
uint32_t image_index);
void _dyld_lookup_and_bind(
const char *symbol_name,
void **address,
NSModule *module);
void _dyld_lookup_and_bind_with_hint(
const char *symbol_name,
const char *library_name_hint,
void **address,
NSModule *module);
void _dyld_lookup_and_bind_fully(
const char *symbol_name,
void **address,
NSModule *module);
bool _dyld_bind_fully_image_containing_address(
const void *address);
bool _dyld_image_containing_address(
const void* address);
const struct mach_header * _dyld_get_image_header_containing_address(
const void* address);
bool _dyld_launched_prebound(void);
bool _dyld_all_twolevel_modules_prebound(void);
int _dyld_func_lookup(
const char *dyld_func_name,
void **address);
extern void _dyld_bind_objc_module(
const void *objc_module);
extern void _dyld_get_objc_module_sect_for_module(
NSModule module,
void **objc_module,
size_t *size);
extern void _dyld_lookup_and_bind_objc(
const char *symbol_name,
void **address,
NSModule *module);
extern void _dyld_moninit(
void (*monaddition)(char *lowpc, char *highpc));
extern void _dyld_register_func_for_add_image(
void (*func)(const struct mach_header *mh, intptr_t vmaddr_slide));
extern void _dyld_register_func_for_remove_image(
void (*func)(const struct mach_header *mh, intptr_t vmaddr_slide));
extern void _dyld_register_func_for_link_module(
_dyld_get_image_header returns the mach header of the image indexed by
image_index. If image_index is out of range NULL is returned.
_dyld_get_image_vmaddr_slide returns the virtural memory address slide
amount of the image indexed by image_index. If image_index is out of
range zero is returned.
_dyld_get_image_name returns the name of the image indexed by
image_index. If image_index is out of range NULL is returned.
_dyld_lookup_and_bind looks up the symbol_name and binds it into the
program. It indirectly returns the address and and a pointer to the
module that defined the symbol.
_dyld_lookup_and_bind_with_hint is the same as _dyld_lookup_and_bind
but the library_name_hint parameter provides a hint as to where to
start the lookup in a prebound program. The library_name_hint parame-
ter is matched up with the actual library install names with strstr(3).
_dyld_lookup_and_bind_fully looks up the symbol_name and binds it and
all of its references into the program. It indirectly returns the
address and and a pointer to the module that defined the symbol.
_dyld_bind_fully_image_containing_address fully binds the image con-
taining the specified address. It returns TRUE if the address is con-
tained in a loaded image and FALSE otherwise.
_dyld_image_containing_address It returns TRUE if the address is con-
tained in an image dyld loaded and FALSE otherwise.
_dyld_get_image_header_containing_address It returns a pointer to the
mach header of the image if the address is contained in an image dyld
loaded and NULL otherwise.
_dyld_launched_prebound returns TRUE if the program was launched using
the prebound state and FALSE otherwise.
returns TRUE if all the libraries currently in use by the program are
being used as two-level namespace libraries, are prebound and have all
their modules bound. Otherwise it returns FALSE.
_dyld_func_lookup is passed a name, dyld_func_name, of a dynamic link
editor function and returns the address of the function indirectly. It
returns non-zero if the function is found and zero otherwise.
_dyld_bind_objc_module is passed a pointer to something in an
(__OBJC,__module) section and causes the module that is associated with
that address to be bound.
_dyld_get_objc_module_sect_for_module is passed a module and sets a
pointer to the (__OBJC,__module) section and its size for the specified
module.
be called when a new image is added (a bundle or a dynamic shared
library) to the program. When this function is first registered it is
called for once for each image that is currently part of the program.
_dyld_register_func_for_remove_image registers the specified function
to be called when an image is removed (a bundle or a dynamic shared
library) from the program. _dyld_register_func_for_link_module regis-
ters the specified function to be called when a module is bound into
the program. When this function is first registered it is called for
once for each module that is currently bound into the program.
Apple Computer, Inc. January 15, 2005 DYLD(3)
Man(1) output converted with
man2html