The bit 0x0020 of the n_desc field is used for two non-overlapping purposes and has two different symbolic names, N_NO_DEAD_STRIP and N_DESC_DISCARDED.
Mask to use with nlist_64.n_type to check what the entry describes
Values for NTypeMask.N_TYPE bits of the nlist_64.n_type field.
To support the lazy binding of undefined symbols in the dynamic link-editor, the undefined symbols in the symbol table (the nlist structures) are marked with the indication if the undefined reference is a lazy reference or non-lazy reference. If both a non-lazy reference and a lazy reference is made to the same symbol the non-lazy reference takes precedence. A reference is lazy only when all references to that symbol are made through a symbol pointer in a lazy symbol pointer section.
For images created by the static link editor with the -twolevel_namespace option in effect the flags field of the mach header is marked with MH_TWOLEVEL. And the binding of the undefined references of the image are determined by the static link editor. Which library an undefined symbol is bound to is recorded by the static linker in the high 8 bits of the n_desc field using the SET_LIBRARY_ORDINAL macro below. The ordinal recorded references the libraries listed in the Mach-O's LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, LC_REEXPORT_DYLIB, LC_LOAD_UPWARD_DYLIB, and LC_LAZY_LOAD_DYLIB, etc. load commands in the order they appear in the headers. The library ordinals start from 1. For a dynamic library that is built as a two-level namespace image the undefined references from module defined in another use the same nlist struct an in that case SELF_LIBRARY_ORDINAL is used as the library ordinal. For defined symbols in all images they also must have the library ordinal set to SELF_LIBRARY_ORDINAL. The EXECUTABLE_ORDINAL refers to the executable image for references from plugins that refer to the executable that loads them.
Common symbols are represented by undefined (N_UNDF) external (N_EXT) types who's values (n_value) are non-zero. In which case the value of the n_value field is the size (in bytes) of the common symbol. The n_sect field is set to NO_SECT. The alignment of a common symbol may be set as a power of 2 between 2^1 and 2^15 as part of the n_desc field using the macros below. If the alignment is not set (a value of zero) then natural alignment based on the size is used.
For images created by the static link editor with the -twolevel_namespace option in effect the flags field of the mach header is marked with MH_TWOLEVEL. And the binding of the undefined references of the image are determined by the static link editor. Which library an undefined symbol is bound to is recorded by the static linker in the high 8 bits of the n_desc field using the SET_LIBRARY_ORDINAL macro below. The ordinal recorded references the libraries listed in the Mach-O's LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, LC_REEXPORT_DYLIB, LC_LOAD_UPWARD_DYLIB, and LC_LAZY_LOAD_DYLIB, etc. load commands in the order they appear in the headers. The library ordinals start from 1. For a dynamic library that is built as a two-level namespace image the undefined references from module defined in another use the same nlist struct an in that case SELF_LIBRARY_ORDINAL is used as the library ordinal. For defined symbols in all images they also must have the library ordinal set to SELF_LIBRARY_ORDINAL. The EXECUTABLE_ORDINAL refers to the executable image for references from plugins that refer to the executable that loads them.
Common symbols are represented by undefined (N_UNDF) external (N_EXT) types who's values (n_value) are non-zero. In which case the value of the n_value field is the size (in bytes) of the common symbol. The n_sect field is set to NO_SECT. The alignment of a common symbol may be set as a power of 2 between 2^1 and 2^15 as part of the n_desc field using the macros below. If the alignment is not set (a value of zero) then natural alignment based on the size is used.
For images created by the static link editor with the -twolevel_namespace option in effect the flags field of the mach header is marked with MH_TWOLEVEL. And the binding of the undefined references of the image are determined by the static link editor. Which library an undefined symbol is bound to is recorded by the static linker in the high 8 bits of the n_desc field using the SET_LIBRARY_ORDINAL macro below. The ordinal recorded references the libraries listed in the Mach-O's LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, LC_REEXPORT_DYLIB, LC_LOAD_UPWARD_DYLIB, and LC_LAZY_LOAD_DYLIB, etc. load commands in the order they appear in the headers. The library ordinals start from 1. For a dynamic library that is built as a two-level namespace image the undefined references from module defined in another use the same nlist struct an in that case SELF_LIBRARY_ORDINAL is used as the library ordinal. For defined symbols in all images they also must have the library ordinal set to SELF_LIBRARY_ORDINAL. The EXECUTABLE_ORDINAL refers to the executable image for references from plugins that refer to the executable that loads them.
Maximum number of sections: 1 thru 255 inclusive
Symbol is not in any section
An entry in a list of symbols for 64-bits architectures
Bindings for symbols and defines in mach-o/nlist.h
This file was created based on the MacOSX 10.15 SDK.