Documentation ¶
Index ¶
- Constants
- Variables
- func CmpArchFunc[T Object](i, j T) int
- func CpuNames() []string
- func CreateFat[T Object](w io.Writer, objects []T, fat64 bool, hideARM64 bool) error
- func FatArchHeaderSize(magic uint32) uint64
- func FatHeaderSize() uint64
- func GuessAlignBit(addr uint64, min, max uint32) uint32
- func IsSupportedCpu(v string) bool
- func SegmentAlignBit(f *macho.File) uint32
- func ToCpu(v string) (cpu Cpu, sub SubCpu, ok bool)
- func ToCpuString(cpu Cpu, subCpu SubCpu) string
- func ToCpuValues(c Cpu, s SubCpu) (cpu string, sub string)
- type Arch
- func (a *Arch) Align() uint32
- func (a *Arch) CPU() Cpu
- func (a *Arch) CPUString() string
- func (a *Arch) Read(p []byte) (int, error)
- func (a *Arch) ReadAt(p []byte, off int64) (int, error)
- func (a *Arch) Seek(offset int64, whence int) (int64, error)
- func (a *Arch) Size() uint64
- func (a *Arch) SubCPU() SubCpu
- func (a *Arch) Type() macho.Type
- type Cpu
- type FatArch
- func (fa *FatArch) Align() uint32
- func (fa *FatArch) CPU() Cpu
- func (fa *FatArch) CPUString() string
- func (fa *FatArch) Offset() uint64
- func (fa *FatArch) Read(p []byte) (int, error)
- func (fa *FatArch) ReadAt(p []byte, off int64) (int, error)
- func (fa *FatArch) Seek(offset int64, whence int) (int64, error)
- func (fa *FatArch) Size() uint64
- func (fa *FatArch) SubCPU() SubCpu
- func (fa *FatArch) Type() macho.Type
- type FatArchHeader
- type FatFile
- type FatHeader
- type FormatError
- type Object
- type Reader
- type SubCpu
Constants ¶
View Source
const MagicFat = macho.MagicFat
View Source
const MagicFat64 = macho.MagicFat + 1
Variables ¶
View Source
var (
ErrThin = errors.New("the file is thin file, not fat")
)
Functions ¶
func CmpArchFunc ¶
https://github.com/apple-oss-distributions/cctools/blob/cctools-973.0.1/misc/lipo.c#L2677
func FatArchHeaderSize ¶
func FatHeaderSize ¶
func FatHeaderSize() uint64
func GuessAlignBit ¶
func IsSupportedCpu ¶
func SegmentAlignBit ¶
func ToCpuString ¶
Types ¶
type Arch ¶
type Arch struct {
// contains filtered or unexported fields
}
Arch presents an object of thin file
type FatArch ¶
type FatArch struct { Hidden bool // contains filtered or unexported fields }
FatArch presents an object of fat file
type FatArchHeader ¶
FatArchHeader presents an architecture header for a Macho-0 32 bit and 64 bit
type FatHeader ¶
FatHeader presents 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 ¶
type FormatError struct {
Err error
}
func (*FormatError) Error ¶
func (e *FormatError) Error() string
type SubCpu ¶
type SubCpu = uint32
const ( SubTypeArmAll SubCpu = 0 SubTypeArmV4T SubCpu = 5 SubTypeArmV6 SubCpu = 6 // skip SubTypeArmV7 SubCpu = 9 SubTypeArmV7F SubCpu = 10 SubTypeArmV7S SubCpu = 11 SubTypeArmV7K SubCpu = 12 // skip SubTypeArmV6M SubCpu = 14 SubTypeArmV7M SubCpu = 15 SubTypeArmV7EM SubCpu = 16 SubTypeArmV8M SubCpu = 17 )
const MaskSubCpuType SubCpu = 0xff000000
const (
SubTypeArm64_32V8 SubCpu = 1
)
Click to show internal directories.
Click to hide internal directories.