2 ms·
Neat! Looks like the closest equivalent in your tooling would be pe2obj, which repacks a PE executable as a COFF object file. Unless I'm mistaken, it doesn't s
by boricj 2y ago
Neat! Looks like the closest equivalent in your tooling would be pe2obj, which repacks a PE executable as a COFF object file.
Unless I'm mistaken, it doesn't seem to do anything in particular w.r.t. relocations, which is the tricky part about delinking. My educated guess it that repacking might be enough for purely self-contained position-independent code and data, but anything that contains an absolute address will lead to dangling references to the original program's address space.
My tooling recovers relocatable section bytes and recreates relocation tables in order to export object files that are actually relocatable, regardless of their contents.
- Ericson2314 2y agoIt's been a long time, but we manually annotated where the relations should be, and other edits, with the patch sections.