Documentation ¶
Index ¶
- Constants
- Variables
- func CpuNames() []string
- func GuessAlignBit(addr uint64, min, max uint32) uint32
- func IsSupportedCpu(v string) bool
- func SegmentAlignBit(f *macho.File) uint32
- func ToCpu(v string) (cpu macho.Cpu, sub uint32, ok bool)
- func ToCpuString(cpu macho.Cpu, subCpu uint32) string
- func ToCpuValues(c macho.Cpu, s uint32) (string, string)
- func ValidateFatArches(arches []FatArch) error
- type FatArch
- type FatArchHeader
- type FatFile
- type FatFileConfig
- type FatHeader
- type File
Constants ¶
View Source
const ( // skip CpuTypeX86 macho.Cpu = 7 CpuTypeI386 macho.Cpu = CpuTypeX86 CpuTypeX86_64 macho.Cpu = CpuTypeI386 | cpuArch64 // skip CpuTypeArm macho.Cpu = 12 CpuTypeArm64 macho.Cpu = CpuTypeArm | cpuArch64 CpuTypeArm64_32 macho.Cpu = CpuTypeArm | cpuArch64_32 CpuTypePpc macho.Cpu = 18 CpuTypePpc64 macho.Cpu = CpuTypePpc | 64 )
View Source
const ( SubCpuTypeX86All uint32 = 3 SubCpuTypeX86_64All uint32 = 3 SubCpuTypeX86Arch1 uint32 = 4 SubCpuTypeX86_64H uint32 = 8 )
View Source
const ( SubCpuTypeArmAll uint32 = 0 SubCpuTypeArmV4T uint32 = 5 SubCpuTypeArmV6 uint32 = 6 // skip SubCpuTypeArmV7 uint32 = 9 SubCpuTypeArmV7F uint32 = 10 SubCpuTypeArmV7S uint32 = 11 SubCpuTypeArmV7K uint32 = 12 // skip SubCpuTypeArmV6M uint32 = 14 SubCpuTypeArmV7M uint32 = 15 SubCpuTypeArmV7EM uint32 = 16 SubCpuTypeArmV8M uint32 = 17 )
View Source
const ( SubCpuTypeArm64All uint32 = 0 SubCpuTypeArm64V8 uint32 = 1 SubCpuTypeArm64E uint32 = 2 )
View Source
const MagicFat64 = macho.MagicFat + 1
View Source
const MaskSubCpuType uint32 = 0xff000000
View Source
const (
SubCpuTypeArm64_32All uint32 = 0
)
Variables ¶
View Source
var SortFunc = sort.Slice
Note mock using qsort
Functions ¶
func GuessAlignBit ¶
func IsSupportedCpu ¶
func SegmentAlignBit ¶
func ValidateFatArches ¶
Types ¶
type FatArch ¶
type FatArch struct { FatArchHeader FileHeader *macho.FileHeader Name string // contains filtered or unexported fields }
FatArchHeader is a header for a Macho-0 32 bit or 64 bit
func NewFatArch ¶
type FatArchHeader ¶
FatArchHeader is a header for a Macho-0 32 bit or 64 bit
type FatFile ¶
FatFile presets an universal file for 32 bit or 64 bit
func NewFatFileFromArches ¶ added in v0.2.1
func NewFatFileFromArches(farches []FatArch, cfg *FatFileConfig) *FatFile
type FatFileConfig ¶
Click to show internal directories.
Click to hide internal directories.