From 91e5b1f6b36f7d243ed450ce226d716a7d073588 Mon Sep 17 00:00:00 2001 From: nganhkhoa Date: Wed, 7 Jun 2023 15:56:36 +0700 Subject: [PATCH] fix parsing fixups chains address was not incrementing correctly leads to wrong offset of symbol --- macho-go/pkg/ios/macho/dyld_info.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macho-go/pkg/ios/macho/dyld_info.go b/macho-go/pkg/ios/macho/dyld_info.go index ab9400f..bf85924 100644 --- a/macho-go/pkg/ios/macho/dyld_info.go +++ b/macho-go/pkg/ios/macho/dyld_info.go @@ -151,11 +151,11 @@ func (mc *MachoContext) CollectBindSymbolsModern() []*ImportSymbol { fmt.Printf("// 0x%x rebase=%d target=0x%x high8=0x%x\n", address, bind, ret1, ret2) } - address += 8 if int(next) == 0 { break } // because the pointer move up 8 bytes already so we minus 8 + address += int64(next * 4) mc.file.Seek(int64(next * 4) - 8, io.SeekCurrent) } mc.file.Seek(0, io.SeekStart)