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

Deduplicate relocation resolution code in ElfLoader #347

Open
RyanGlScott opened this issue Nov 3, 2023 · 0 comments
Open

Deduplicate relocation resolution code in ElfLoader #347

RyanGlScott opened this issue Nov 3, 2023 · 0 comments
Labels
enhancement tech-debt Technical debt that would be nice to clean up

Comments

@RyanGlScott
Copy link
Contributor

The code in Data.Macaw.Memory.ElfLoader which resolves relocations (here) is quite long, and unnecessarily so. While each architecture has its own relocation types, many of them are handled in a very similar matter. For instance, all supported architectures have a JUMP_SLOT relocation type, which are handled nearly identically in relaTargetX86_64, relocARM32Abs, and relaTargetARM64, with only minor differences in the relocation size and endianness (which could be inferred from the architecture).

As much as possible, we should strive to use the same logic to resolve each category of relocation type across different architectures.

@RyanGlScott RyanGlScott added enhancement tech-debt Technical debt that would be nice to clean up labels Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement tech-debt Technical debt that would be nice to clean up
Projects
None yet
Development

No branches or pull requests

1 participant