REDO_PREBINDING(3) Library Functions Manual REDO_PREBINDING(3)
NAME
redo_prebinding library functions
SYNOPSIS
#include <mach-o/redo_prebinding.h>
extern char ** dependent_libs(
const char *file_name,
const char *program_name,
char **error_message);
extern char * install_name(
const char *file_name,
const char *program_name,
char **error_message);
extern enum redo_prebinding_retval redo_prebinding(
const char *file_name,
const char *executable_path,
const char *root_dir,
const char *output_file,
const char *program_name,
char **error_message,
unsigned long slide_to_address,
int only_if_needed,
int zero_out_prebind_checksum,
cpu_type_t allow_missing_architectures,
unsigned long *throttle);
extern enum needs_redo_prebinding_retval needs_redo_prebinding(
const char *file_name,
const char *executable_path,
const char *root_dir,
const char *program_name,
char **error_message,
unsigned long expected_address,
cpu_type_t allow_missing_architectures);
extern enum object_file_type_retval object_file_type(
const char *file_name,
const char *program_name,
char **error_message);
extern int get_prebind_cksums(
const char *file_name,
struct prebind_cksum_arch **cksums,
unsigned long *ncksums,
const char *program_name,
char **error_message);
DESCRIPTION
These functions are intended for use by update_prebinding(1) and Mac OS X Build and Integration tools.
For all of these functions in the parameters program_name and error_message are used the same. For unrecoverable resource errors like
being unable to allocate memory each function prints a message to stderr precede with program_name then calls exit(2) with the value
EXIT_FAILURE. If a function is unsuccessful and if error_message pass to it is not NULL it is set to a malloc(3)'ed buffer with a NULL
terminated string with the error message. For all functions when they return they release all resources (memory, open file descriptors,
etc).
The file_name parameter for these functions may be of the form foo(bar) which is NOT interpreted as an archive name and a member name in
that archive. As these functions deal with prebinding and prebound binaries ready for execution can't be in archives.
If the executable_path parameter for these functions is not NULL it is used for any dependent library has a path that starts with @exe-
cutable_path. Then @executable_path is replaced with executable_path.
If the root_dir parameter is not NULL it is prepended to all the rooted dependent library paths.
dependent_libs() takes a file_name of a binary and returns a malloc(3)'ed array of pointers (NULL terminated) to names (also malloc(3)'ed
and '