NSObjectFileImage(3)

πŸ“¦ version 1010.6, in nixpkgs unstable

πŸŽ€ 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