core.sys.darwin.mach.nlist

Bindings for symbols and defines in mach-o/nlist.h

This file was created based on the MacOSX 10.15 SDK.

Types 1

structnlist_64

An entry in a list of symbols for 64-bits architectures

Said symbols can be used to describe many different type of data, including STABS debug infos. Introduced in MacOSX 10.8 SDK.

See Also

Fields
uint n_strxIndex of this symbol's name into the string table
ubyte n_typeA bitfield that describes the type of this symbol
ubyte n_sectSection number (note that `0` means `NO_SECT`)
ushort n_desc
ulong n_value

Functions 4

fnubyte GET_COMM_ALIGN(uint n_desc) @safeCommon symbols are represented by undefined (NUNDF) external (NEXT) types who's values (nvalue) are non-zero. In which case the value of the nvalue field is the size (in bytes) of the common symbo...
fnushort SET_COMM_ALIGN(return ref ushort n_desc, size_t wanted_align) ref @safeDitto
fnubyte GET_LIBRARY_ORDINAL(uint n_desc) @safeFor images created by the static link editor with the -twolevelnamespace option in effect the flags field of the mach header is marked with MHTWOLEVEL. And the binding of the undefined references ...
fnushort SET_LIBRARY_ORDINAL(return ref ushort n_desc, uint ordinal) ref @safeDitto

Variables 2

enumvarNO_SECT = 0

Symbol is not in any section

If the type is N_SECT then the n_sect field contains an ordinal of the section the symbol is defined in. The sections are numbered from 1 and refer to sections in order they appear in the load commands for the file they are in. This means the same ordinal may very well refer to different sections in different files.

The n_value field for all symbol table entries (including N_STAB's) gets updated by the link editor based on the value of it's n_sect field and where the section n_sect references gets relocated. If the value of the n_sect field is NO_SECT then it's n_value field is not changed by the link editor.

enumvarMAX_SECT = 255

Maximum number of sections: 1 thru 255 inclusive