Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x86 relocation applied incorrectly #184

Open
1superchip opened this issue Feb 20, 2025 · 1 comment
Open

x86 relocation applied incorrectly #184

1superchip opened this issue Feb 20, 2025 · 1 comment

Comments

@1superchip
Copy link
Collaborator

1superchip commented Feb 20, 2025

It looks like a regex is capturing the wrong data in the instruction fstps 0x10. We should be getting ?lastCollision@@3UCollisionResult@@A+0x10.

The regex is capturing 0 at the end of 0x10 and then replacing that with the relocation.

asm-differ output:
Image

objdump:
Image

Scratch: https://decomp.me/scratch/5IHQ5

Looking at the regexes within process_reloc, we are getting a bad result with https://github.com/simonlindholm/asm-differ/blob/main/diff.py#L2079C36-L2079C46. https://regex101.com/r/SUIY2l/1

This looks similar to the issue of #183 (comment).

@1superchip
Copy link
Collaborator Author

1superchip commented Feb 20, 2025

The regex (?:0x)?(?<![1-9])0$ looks good.

It doesn't match any strings that have 1-9 before the final 0.

https://regex101.com/r/rH4Vp2/1

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

No branches or pull requests

1 participant