Skip to content

Commit 9a305b6

Browse files
committed
[MachoView] Bind relative pointer to __TEXT instead of image base
1 parent 84dd754 commit 9a305b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

view/macho/machoview.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1946,7 +1946,7 @@ bool MachoView::InitializeHeader(MachOHeader& header, bool isMainHeader, uint64_
19461946

19471947
// FIXME: i don't know how to define proper pointer type at this stage of analysis
19481948
Ref<Type> pointerVar = TypeBuilder::PointerType(4, Type::VoidType())
1949-
.SetPointerBase(RelativeToBinaryStartPointerBaseType, 0)
1949+
.SetPointerBase(RelativeToConstantPointerBaseType, header.textBase)
19501950
.Finalize();
19511951
DefineDataVariable(GetStart() + reader.GetOffset() - 4, pointerVar);
19521952
}

0 commit comments

Comments
 (0)