Package ghidra.app.util.bin.format.macho
Class MachHeaderFlags
java.lang.Object
ghidra.app.util.bin.format.macho.MachHeaderFlags
Constants for the flags field of the mach_header
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
indicates that this binary binds to all two-level namespace modules of its dependent libraries.static final int
When this bit is set, all stacks in the task will be given stack execution privilege.static final int
The code was linked for use in an application extension.static final int
the object file's undefined references are bound by the dynamic linker when loadedstatic final int
the final linked image uses weak symbols.static final int
the binary has been canonicalized via the unprebind operation.static final int
Only for use on dylibs.static final int
the object file is input for the dynamic linker and can't be staticly link edited againstatic final int
Only for use on dylibs.static final int
the executable is forcing all images to use flat name space bindingsstatic final int
Contains a section of type S_THREAD_LOCAL_VARIABLES.static final int
the object file is the output of an incremental link against a base file and can't be link edited again.static final int
the shared library init routine is to be run lazily via catching memory faults to its writeable segments (obsolete)static final int
The external symbols listed in the nlist symbol table do not include all the symbols listed in the dyld info.static final int
When this bit is set, the OS will run the main executable with a non-executable heap even on platforms ( e.g., i386 ) that don't require it.static final int
When this bit is set on a dylib, the static linker does not need to examine dependent dylibs to see if any are re-exportedstatic final int
do not have dyld notify the prebinding agent about this executablestatic final int
this umbrella guarantees no multiple definitions of symbols in its sub-images so the two-level namespace hints can always be usedstatic final int
the object file has no undefined referencesstatic final int
When this bit is set, the OS will load the main executable at a random address.static final int
the binary is not prebound but can have its prebinding redone.static final int
the file has its dynamic undefined references preboundstatic final int
When this bit is set, the binary declares it is safe for use in processes with uid zerostatic final int
When this bit is set, the binary declares it is safe for use in processes when issetugid() is truestatic final int
Allow LC_MIN_VERSION_MACOS and LC_BUILD_VERSION load commands with the platforms macOS, iOSMac, iOSSimulator, tvOSSimulator and watchOSSimulator.static final int
the file has its read-only and read-write segments splitstatic final int
safe to divide up the sections into sub-sections via symbols for dead code strippingstatic final int
the image is using two-level name space bindingsstatic final int
the final linked image contains external weak symbols. -
Constructor Summary
-
Method Summary
-
Field Details
-
MH_NOUNDEFS
public static final int MH_NOUNDEFSthe object file has no undefined references- See Also:
-
MH_INCRLINK
public static final int MH_INCRLINKthe object file is the output of an incremental link against a base file and can't be link edited again.- See Also:
-
MH_DYLDLINK
public static final int MH_DYLDLINKthe object file is input for the dynamic linker and can't be staticly link edited again- See Also:
-
MH_BINDATLOAD
public static final int MH_BINDATLOADthe object file's undefined references are bound by the dynamic linker when loaded- See Also:
-
MH_PREBOUND
public static final int MH_PREBOUNDthe file has its dynamic undefined references prebound- See Also:
-
MH_SPLIT_SEGS
public static final int MH_SPLIT_SEGSthe file has its read-only and read-write segments split- See Also:
-
MH_LAZY_INIT
public static final int MH_LAZY_INITthe shared library init routine is to be run lazily via catching memory faults to its writeable segments (obsolete)- See Also:
-
MH_TWOLEVEL
public static final int MH_TWOLEVELthe image is using two-level name space bindings- See Also:
-
MH_FORCE_FLAT
public static final int MH_FORCE_FLATthe executable is forcing all images to use flat name space bindings- See Also:
-
MH_NOMULTIDEFS
public static final int MH_NOMULTIDEFSthis umbrella guarantees no multiple definitions of symbols in its sub-images so the two-level namespace hints can always be used- See Also:
-
MH_NOFIXPREBINDING
public static final int MH_NOFIXPREBINDINGdo not have dyld notify the prebinding agent about this executable- See Also:
-
MH_PREBINDABLE
public static final int MH_PREBINDABLEthe binary is not prebound but can have its prebinding redone. only used when MH_PREBOUND is not set- See Also:
-
MH_ALLMODSBOUND
public static final int MH_ALLMODSBOUNDindicates that this binary binds to all two-level namespace modules of its dependent libraries. only used when MH_PREBINDABLE and MH_TWOLEVEL are both set.- See Also:
-
MH_SUBSECTIONS_VIA_SYMBOLS
public static final int MH_SUBSECTIONS_VIA_SYMBOLSsafe to divide up the sections into sub-sections via symbols for dead code stripping- See Also:
-
MH_CANONICAL
public static final int MH_CANONICALthe binary has been canonicalized via the unprebind operation.- See Also:
-
MH_WEAK_DEFINES
public static final int MH_WEAK_DEFINESthe final linked image contains external weak symbols.- See Also:
-
MH_BINDS_TO_WEAK
public static final int MH_BINDS_TO_WEAKthe final linked image uses weak symbols.- See Also:
-
MH_ALLOW_STACK_EXECUTION
public static final int MH_ALLOW_STACK_EXECUTIONWhen this bit is set, all stacks in the task will be given stack execution privilege. only used in MH_EXECUTE filetypes.- See Also:
-
MH_ROOT_SAFE
public static final int MH_ROOT_SAFEWhen this bit is set, the binary declares it is safe for use in processes with uid zero- See Also:
-
MH_SETUID_SAFE
public static final int MH_SETUID_SAFEWhen this bit is set, the binary declares it is safe for use in processes when issetugid() is true- See Also:
-
MH_NO_REEXPORTED_DYLIBS
public static final int MH_NO_REEXPORTED_DYLIBSWhen this bit is set on a dylib, the static linker does not need to examine dependent dylibs to see if any are re-exported- See Also:
-
MH_PIE
public static final int MH_PIEWhen this bit is set, the OS will load the main executable at a random address. Only used in MH_EXECUTE filetypes.- See Also:
-
MH_DEAD_STRIPPABLE_DYLIB
public static final int MH_DEAD_STRIPPABLE_DYLIBOnly for use on dylibs. When linking against a dylib that has this bit set, the static linker will automatically not create a LC_LOAD_DYLIB load command to the dylib if no symbols are being referenced from the dylib.- See Also:
-
MH_HAS_TLV_DESCRIPTORS
public static final int MH_HAS_TLV_DESCRIPTORSContains a section of type S_THREAD_LOCAL_VARIABLES.- See Also:
-
MH_NO_HEAP_EXECUTION
public static final int MH_NO_HEAP_EXECUTIONWhen this bit is set, the OS will run the main executable with a non-executable heap even on platforms ( e.g., i386 ) that don't require it. Only used in MH_EXECUTE file types.- See Also:
-
MH_APP_EXTENSION_SAFE
public static final int MH_APP_EXTENSION_SAFEThe code was linked for use in an application extension.- See Also:
-
MH_NLIST_OUTOFSYNC_WITH_DYLDINFO
public static final int MH_NLIST_OUTOFSYNC_WITH_DYLDINFOThe external symbols listed in the nlist symbol table do not include all the symbols listed in the dyld info.- See Also:
-
MH_SIM_SUPPORT
public static final int MH_SIM_SUPPORTAllow LC_MIN_VERSION_MACOS and LC_BUILD_VERSION load commands with the platforms macOS, iOSMac, iOSSimulator, tvOSSimulator and watchOSSimulator.- See Also:
-
MH_DYLIB_IN_CACHE
public static final int MH_DYLIB_IN_CACHEOnly for use on dylibs. When this bit is set, the dylib is part of the dyld shared cache, rather than loose in the filesystem.- See Also:
-
-
Constructor Details
-
MachHeaderFlags
public MachHeaderFlags()
-
-
Method Details
-
getFlags
Returns string representation of the flag values.- Parameters:
flags
- the flags value to get the string representation of.- Returns:
- a string representation of the flag values.
-