Documentation ¶
Index ¶
- Constants
- func CmpArchFunc(i, j FatArch) int
- func CpuNames() []string
- func GuessAlignBit(addr uint64, min, max uint32) uint32
- func IsSupportedCpu(v string) bool
- func SegmentAlignBit(f *macho.File) uint32
- func ToCpuString(cpu macho.Cpu, subCpu SubCpu) string
- func ToCpuValues(c macho.Cpu, s SubCpu) (cpu string, sub string)
- type FatArch
- type FatArchHeader
- type FatFile
- type FatFileConfig
- type FatHeader
- type File
- type FormatError
- type SubCpu
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 MagicFat64 = macho.MagicFat + 1
Variables ¶
This section is empty.
Functions ¶
func CmpArchFunc ¶ added in v0.4.1
https://github.com/apple-oss-distributions/cctools/blob/cctools-973.0.1/misc/lipo.c#L2677
func GuessAlignBit ¶
func IsSupportedCpu ¶
func SegmentAlignBit ¶
Types ¶
type FatArch ¶
type FatArch struct { FatArchHeader FileHeader *macho.FileHeader Name string // contains filtered or unexported fields }
FatArch has architecture information to create a fat file.
func NewFatArch ¶
type FatArchHeader ¶
FatArchHeader presets an architecture header for a Macho-0 32 bit and 64 bit
type FatFile ¶
FatFile presets an universal file
func NewFatFile ¶ added in v0.6.0
func NewFatFileFromArches ¶ added in v0.2.1
func NewFatFileFromArches(farches []FatArch, cfg *FatFileConfig) *FatFile
type FatFileConfig ¶
type FatHeader ¶
FatHeader presets a header for a fat 32 bit and fat 64 bit see /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach-o/fat.h
type FormatError ¶ added in v0.6.0
type FormatError struct {
Err error
}
func (*FormatError) Error ¶ added in v0.6.0
func (e *FormatError) Error() string
type SubCpu ¶ added in v0.5.0
type SubCpu = uint32
const ( SubCpuTypeArmAll SubCpu = 0 SubCpuTypeArmV4T SubCpu = 5 SubCpuTypeArmV6 SubCpu = 6 // skip SubCpuTypeArmV7 SubCpu = 9 SubCpuTypeArmV7F SubCpu = 10 SubCpuTypeArmV7S SubCpu = 11 SubCpuTypeArmV7K SubCpu = 12 // skip SubCpuTypeArmV6M SubCpu = 14 SubCpuTypeArmV7M SubCpu = 15 SubCpuTypeArmV7EM SubCpu = 16 SubCpuTypeArmV8M SubCpu = 17 )
const MaskSubCpuType SubCpu = 0xff000000
const (
SubCpuTypeArm64_32V8 SubCpu = 1
)
Click to show internal directories.
Click to hide internal directories.