NSObjectFileImage(3)
π NAME
okay so this is NSObjectFileImage(3) from the Library Functions Manual, bestie π and the actual page name is NSObjectFileImage_priv β programmatic interface for working with Mach-O files. periodt.
β¨ 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βs checked to insure itβs a valid format and itβs compatible with the host machineβs cpu architecture. iykyk π
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 use the resulting sectionOffset to index into the data returned by NSGetSectionDataInObjectFileImage. the way that sectionOffset does its little indexing job is lowkey iconic πΈ
the synopsis comments are also clear that segmentName, sectionName, and sectionOffset can each be NULL β no cap π«Ά
NSHasModInitObjectFileImage returns TRUE if the NSObjectFileImage has any module initialization routines and FALSE otherwise. thatβs it, thatβs the vibe check β
π ALSO SEE
xoxo, Apple Computer, Inc. π July 9, 2003, from NSObjectFileImage(3) β bye bestie! π«Άπ
π¦ where this page comes from
- nixpkgs unstable: cctools 1010.6
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms