Skip to content

Support R_MIPS_GPREL16 relocations correctly #88

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

Merged
merged 3 commits into from
Aug 9, 2024

Conversation

SquareMan
Copy link
Contributor

Discussed in discord.

synopsis: objdiff does not currently read the ri_gp_value field from the .reginfo header for MIPS objects, which is required to calculate R_MIPS_GPREL16 relocations for local symbols.

This PR attempts to correct that. Passing the file to implicit_addend is required to determine whether the symbol being relocated against is local or not.

symbols defined in the same file require adding a
special ri_gp_value from the .reginfo section to
their relocation calculations.
@SquareMan
Copy link
Contributor Author

Looks like you're using nightly for fmt. Hopefully the code style is fixed now.

@encounter
Copy link
Owner

Thanks a lot for the fix!

@encounter encounter merged commit 09cc995 into encounter:main Aug 9, 2024
10 checks passed
@SquareMan SquareMan deleted the r_mips_gprel16 branch August 9, 2024 02:53
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.

2 participants