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

MIPS: Support for relocations that pair multiple R_MIPS_LO16 against a single R_MIPS_HI16 #627

Closed
bmourit opened this issue Aug 24, 2019 · 1 comment

Comments

@bmourit
Copy link
Contributor

bmourit commented Aug 24, 2019

According to https://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf, a R_MIPS_LO16 without a R_MIPS_HI16 (orphaned) should be matched with the previous R_MIPS_HI16. This isn't currently taken into consideration in mips relocation.

This isn't a bug, but rather an enhancement. I think a simple variable to hold the previous value to pair with an orphaned lo16 would be sufficient here. If I get time I'll post a pull request for this.

bmourit added a commit to bmourit/retdec that referenced this issue Aug 24, 2019
MIPS: Add support for orphaned lo16 relocations.

This fixes issue avast#627
@PeterMatula
Copy link
Collaborator

Thanks.
Do you have some test case that we could add to regression tests? Did you find this problem in a sample you could share - you don't mind if we add it to a public test suite.

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

No branches or pull requests

3 participants