Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions examples/hello_mips32_linux_customapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ def my_puts(ql: Qiling):

if __name__ == "__main__":
ql = Qiling(["rootfs/mips32_linux/bin/mips32_hello"], "rootfs/mips32_linux", verbose=QL_VERBOSE.DEBUG)
ql.os.set_api("puts", my_puts)
ql.run()
2 changes: 1 addition & 1 deletion examples/rootfs
Submodule rootfs updated 301 files
7 changes: 4 additions & 3 deletions qiling/os/linux/function_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,9 @@ def __init__(self, ql, phoff, phnum, phentsize, load_base, hook_mem):

# MIPS32
elif self.ql.arch.type == QL_ARCH.MIPS:
self.GLOB_DAT = 21
self.JMP_SLOT = 22
# ref: https://sites.uclouvain.be/SystInfo/usr/include/elf.h.html
self.GLOB_DAT = 51
self.JMP_SLOT = 127
# add $t9, $t9, $zero
ins = b' \xc8 \x03'
self.add_function_hook = self.add_function_hook_mips
Expand Down Expand Up @@ -982,4 +983,4 @@ def add_function_hook_mips(self, funcname, cb, pos, userdata = None):
# self.hook_int = True

def _load_import(self):
pass
pass