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

Add support for PE #34

Merged
merged 87 commits into from
Oct 1, 2024
Merged

Add support for PE #34

merged 87 commits into from
Oct 1, 2024

Conversation

xoofx
Copy link
Owner

@xoofx xoofx commented Sep 22, 2024

Draft PR that brings support PE read/write.

The code is far from complete but it is starting to get a good chunk of functionalities.

What is missing:

  • Delay Import Directory
  • Bound Import Directory
  • Debug Directory
  • Printing PE
  • Writing PE
  • Validating PE
  • Manual PE Creation
  • Add PE checksum calculation
  • Add PE signing
  • Basic Unit tests
  • Class diagram PE
  • Basic Documentation PE
  • Advanced Documentation PE

The PR is also bringing significant refactoring of the base Object (e.g ObjectFileNode to ObjectElement/ObjectFileElement), so this PR comes with lots of breaking changes.

This PR is not meant to be reviewed, too big! 😅

@xoofx xoofx merged commit b21ed3f into master Oct 1, 2024
2 checks passed
@xoofx
Copy link
Owner Author

xoofx commented Oct 1, 2024

@filipnavara hey, I saw that you saw. 😅 I don't know if you will have any use of this, but it is completed and I'm really happy with the results and the API. 🎉

@xoofx xoofx deleted the add-support-PE branch October 1, 2024 19:16
@filipnavara
Copy link
Contributor

I may have a use for it in some side projects. Lots of plans for next year and little time so let’s see what makes the cut :) Congratulations on the big release!

@xoofx
Copy link
Owner Author

xoofx commented Oct 2, 2024

One thing that I'm going to investigate in the coming days, while it's still fresh in mind, is how I can reinject in the ELF part some of the things I have revisited while developing PE. As I folded the PE Directories into PE Sections, it made the design much simpler and versatile to support any kind of layout, and to author it easily while keeping an API that is easy to use.

The ElfObjectFile design has a relatively strict separation between sections and segments, but I could definitely see that sections could be designed in a similar way I designed PE Directory. It might help with some ELF oddities that ElfObjectFile had trouble to manage, and it could make it simpler to author in the end. I will open a PR if I have found improvements. Let's see. 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants