NSObjectFileImage(3)

NAME
NSObjectFileImage_priv - programmatic interface for working with Mach-O files

SYNOPSIS

#include <mach-o/dyld_priv.h>

extern enum DYLD_BOOL
NSFindSectionAndOffsetInObjectFileImage(
	NSObjectFileImage objectFileImage,
	unsigned long imageOffset,
	const char** segmentName, 	/* can be NULL */
	const char** sectionName, 	/* can be NULL */
	unsigned long* sectionOffset)	/* can be NULL */

extern enum DYLD_BOOL
NSHasModInitObjectFileImage(
	NSObjectFileImage objectFileImage);

DESCRIPTION

These routines are the programmatic interface for working with Mach-O files. They bring the Mach-O file into memory and the API allows the file to be inspected or loaded into the program. On creation of an object file image it is checked to insure it is a valid format and it is compatible with the host machine's cpu architecture.

NSFindSectionAndOffsetInObjectFileImage is supplied an imageOffset into an ObjectFileImage and returns via parameters the segment/section name and offset into that section of that imageOffset. It returns FALSE if the imageOffset is not in any section, otherwise TRUE. You can used the resulting sectionOffset to index into the data returned by NSGetSectionDataInObjectFileImage.

NSHasModInitObjectFileImage returns TRUE if the NSObjectFileImage has any module initialization routines and FALSE otherwise.

ALSO SEE
NSObjectFileImage(3), NSModule(3), dyld(3)