-
Notifications
You must be signed in to change notification settings - Fork 156
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
Adding option 'Host' to BinaryFormat enum + new exampel #661
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I'd like a slightly different API for the binary format, see the comments.
Also, please don't add the example in this PR. It was just a rough conversion of the faerie code. I'll add a better example in a different PR.
src/write/mod.rs
Outdated
pub fn new(mut format: BinaryFormat, architecture: Architecture, endian: Endianness) -> Object<'a> { | ||
if format == BinaryFormat::Host { | ||
format = format.get(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change can be deleted after Host
is replaced with native_object
.
Co-authored-by: Philip Craig <[email protected]>
Co-authored-by: Philip Craig <[email protected]>
Co-authored-by: Philip Craig <[email protected]>
Ok i integrated your changes but i renamed |
Yes please remove the directory too. Also keep the name as |
I fixed it |
Hi,
I added the enum-varient
Host
to theBinaryFormat
enum, which automaticly maps under Windows to Coff on MacOS to Macho and on other platforms to Elf.I also added the translated faerie example (thanks @philipc for the code while he was very nicely helping me out), because i think the exampels which are currently in place, are hard to understand as someone (like me) comming from
faerie
Bye