I wonder what it is that makes this process slow ... is there something fundamental about ELF parsing that is slow?
Or maybe it's something in the way we rewrite files.
It would be interesting to profile this and know we're not doing anything silly; it seems like the kind of thing there are many opportunities to be sub-optimal (this may be down to how we use LEIF).
I'm not sure other python interpreters are up to version 3.11, so that avenue may be out.
I did a mostly literal translation of the python code to rust, using ElfStream from https://docs.rs/elf/latest/elf/ instead of LIEF. It is now much faster.
I wonder what it is that makes this process slow ... is there something fundamental about ELF parsing that is slow?
Or maybe it's something in the way we rewrite files.
It would be interesting to profile this and know we're not doing anything silly; it seems like the kind of thing there are many opportunities to be sub-optimal (this may be down to how we use LEIF).
I'm not sure other python interpreters are up to version 3.11, so that avenue may be out.