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

Minimize use of ELF64LEObjectFile over ELFObjectFileBase in annotating_importer. #241

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

virajbshah
Copy link
Collaborator

  • Minor refactoring of usages of ELF64LEObjectFiles to ELFObjectFileBases in annotating_importer.
  • This change is meant to help merge some functionality in annotating_importer with extract_bbs_from_obj_lib.

…_importer`.

 * Minor refactoring of usages of `ELF64LEObjectFile`s to
   `ELFObjectFileBase`s in `annotating_importer`.
 * This change is meant to help merge some functionality in
   `annotating_importer` with `extract_bbs_from_obj_lib`.
Copy link
Collaborator

@boomanaiden154 boomanaiden154 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit, otherwise LGTM.

Ondrej should probably review this patch too given the size though.

Also, is this just preemptive/cleanup, or are there actual plans to get this working on 32-bit/big-endian architectures?

gematria/datasets/annotating_importer.cc Show resolved Hide resolved
@virajbshah
Copy link
Collaborator Author

This is mostly just cleanup to make things easier to merge with extract_bbs_from_obj_lib. Plus it makes more sense to have ELFObjectFileBases passed around over ELF64LEObjectFiles since the only thing that requires us to specify the underlying ELFT is getting the program headers, which in turn is only needed for some address computations. So, if I can find a clean way to make things work for the other 3 ELFTs I might as well as do it.

@virajbshah virajbshah merged commit 53b4e5d into google:main Oct 28, 2024
7 checks passed
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.

3 participants