From 2628d3bed73f587228ccfeb11a68ee0b7a03bf1c Mon Sep 17 00:00:00 2001 From: Zxilly Date: Mon, 29 Jan 2024 22:04:03 +0800 Subject: [PATCH] chore: remove unused code --- macho.go | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/macho.go b/macho.go index 2a46a1d..28ba63a 100644 --- a/macho.go +++ b/macho.go @@ -21,7 +21,6 @@ import ( "debug/gosym" "debug/macho" "fmt" - "math" "os" ) @@ -42,22 +41,8 @@ func openMachO(fp string) (*machoFile, error) { var _ fileHandler = (*machoFile)(nil) type machoFile struct { - file *macho.File - osFile *os.File - textStart uint64 -} - -func (m *machoFile) trySetTextStart() { - addr := uint64(math.MaxUint64) - if m.file.Symtab != nil { - for _, sym := range m.file.Symtab.Syms { - if sym.Name == "runtime.text" { - addr = sym.Value - break - } - } - } - m.textStart = addr + file *macho.File + osFile *os.File } func (m *machoFile) GetParsedFile() any {