cole14/rust-elf

Expose data+offset from ParsingIterator?

dreiss opened this issue · 0 comments

I'm trying to use this crate to relocate an ELF object. My strategy is to make a copy of the object, parse one copy to find relocations, and use them to modify the other copy. This works fine, but I also need to relocate the elf header, section header table, program header table, and symbol table. The problem is that ParsingIterator doesn't let me query where it is in the file, so if I use it to traverse these structures, I won't be able to modify the corresponding bytes in the second copy of the object. Would it be reasonable for ParsingIterator to expose these?