Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion qiling/os/linux/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,13 @@ def _clear_queued_msg(self):
pass

def _prepare_lib_patch(self):
if self.ql.loader.elf_entry != self.ql.loader.entry_point:
# If current control flow comes from a second call of ql.run method, which means
# we have complished the preparation of library patch, then ql.entry_point would
# be the next instruction needed to execute, so we do not need do library patch twice now.
if self.ql.entry_point is not None:
self.ql.loader.elf_entry = self.ql.entry_point
return None
elif self.ql.loader.elf_entry != self.ql.loader.entry_point:
entry_address = self.ql.loader.elf_entry

if self.ql.arch.type == QL_ARCH.ARM:
Expand Down