Skip to content

handle consecutive PC-relative instructions#1

Open
segfault-bilibili wants to merge 4 commits into
shatyuka:masterfrom
segfault-bilibili:20230830-fix-consecutive-ldr-lsp
Open

handle consecutive PC-relative instructions#1
segfault-bilibili wants to merge 4 commits into
shatyuka:masterfrom
segfault-bilibili:20230830-fix-consecutive-ldr-lsp

Conversation

@segfault-bilibili

Copy link
Copy Markdown

change Rn to something else than pc, fill it with value of origin pc

example1:
     ldr r0, [pc, jmpews#4]
     ldr r0, [pc, r0]  ; <- we are here
     bx lr
     dcd vmaddr_offset_relative_to_pc

example2:
     ldr r1, [pc, jmpews#8]
     add r1, pc, r1    ; <- we are here
     str r0, [r1]
     bx lr
     dcd vmaddr_offset_relative_to_pc
@segfault-bilibili

segfault-bilibili commented Aug 30, 2023

Copy link
Copy Markdown
Author

I'm sorry that my code looks messy... However I eager to see comments from people who are really familiar with this field. (although I've already fixed the problem I encountered when hooking the mobile game Magia Record)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant