m4b
m4b
Yea, so I started work on a pure rust in-memory minimal linker a few times, but I lost interest/got distracted because it gets extremely complicated very quickly, along with lots...
i see; so if I understand correctly, you effectively want to specify the entry point field in the object file? i think that's somewhat unusual, since object files don't really...
got it; so almost a sort of passthrough linker, in that it takes the artifact info, and without relocating, just simply emits an executable with some given entry point. this...
E.g., something like: ```rust let mut obj = artifact.to_bytes::()?; let mut header = obj.pread::(0); header.e_type = header::ET_EXEC; header.e_entry = 0xdeadbeef; obj.pwrite(header, 0)?; ```
@kitlith yes I think it would be very straightforward to add it, if you want to add a PR, go for it ! My hope was the faerie would be...
@kitlith actually can you paste an invocation you would want? Do you want something like: ```rust obj.declare("foo", Decl::function().writeable().executable())?; ``` From your comments, i think so? As you say custom sections...
Yea we should not ever panic if this comes from user input.
Just breezing over this my first thought re APIs was what you wrote @philipc; but before we get into details maybe @sunfishcode can give some insight into labels and how...
@lygstate I would _love_ to add PE-COFF! I meant to add one, but I simply don't have the bandwidth at the moment. Note, I would prefer to do this in...
I think for starters, especially since dynamic relocations are out of scope for this crate, it would be good to focus only on linker relocation directives (although many dynamic relocations...