Open
f, err := macho.Open("/bin/ls")
if err != nil { log.Fatal(err) }
defer f.Close()
for _, s := range f.Sections {
fmt.Println(s.Name, s.Seg, s.Size)
}
debug/machoRead Mach-O binaries (macOS, iOS). Symbols, sections, load commands.
f, err := macho.Open("/bin/ls")
if err != nil { log.Fatal(err) }
defer f.Close()
for _, s := range f.Sections {
fmt.Println(s.Name, s.Seg, s.Size)
}
fat, _ := macho.OpenFat("/bin/ls")
for _, arch := range fat.Arches {
fmt.Println(arch.Cpu)
}