DYLD(3)DYLD(3)NAMEdyld - programatic interface to the dynamic link editor
SYNOPSIS
#include <mach-o/dyld.h>
unsigned long _dyld_present(void);
unsigned long _dyld_image_count(void);
struct mach_header *_dyld_get_image_header(unsigned long image_index);
unsigned long _dyld_get_image_vmaddr_slide(unsigned long image_index);
char *_dyld_get_image_name(unsigned long image_index);
void _dyld_lookup_and_bind(char *symbol_name, unsigned long *address, void **module);
void _dyld_lookup_and_bind_fully(char *symbol_name, unsigned long *address, void **module);
enum bool _dyld_bind_fully_image_containing_address(unsigned long *address);
enum bool _dyld_launched_prebound(void);
int _dyld_func_lookup(char *dyld_func_name, unsigned long *address);
DESCRIPTION
These routines are the programatic interface to the dynamic link
editor.
_dyld_present returns non-zero if the dynamic linker is being used in
the program and zero otherwise. If this returns zero this rest of
these functions should not be called and most likely crash the program
if called.
_dyld_image_count returns the current number of images mapped in by the
dynamic link editor.
_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_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
containing the specified address. It returns TRUE if the address is
contained in a loaded image and FALSE otherwise.
_dyld_launched_prebound returns TRUE if the program was launched using
the prebound state and FALSE otherwise.
_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.
NeXT Computer, Inc. July 24, 1995 DYLD(3)