3 ms·
In order to enable relinking, they had to keep around all original .o and .a files, as well as a Makefile. Not a problem for OpenBSD but pretty unusual for bina
by theamk 4y ago
In order to enable relinking, they had to keep around all original .o and .a files, as well as a Makefile. Not a problem for OpenBSD but pretty unusual for binary Linux distros.
I wonder if it is possible to make a relinker which only requires binary output -- so it could be easily incorporated into existing systems.
One way I can think of is to keep relocation/original object information in the debug sections, so that one can reconstruct original object files and re-link them. But I am guessing this will not work with LTO though... Or maybe we can just make a bunch of debug sections and store input object/library files verbatim -- this will at least double the binary size, but will allow for easier relinking.
- wolf550e 4y agoI think Facebook BOLT relinks binaries: https://research.facebook.com/publications/bolt-a-practical-binary-optimizer-for-data-centers-and-beyond/ https://research.facebook.com/publications/bolt-a-practical-... https://groups.google.com/g/llvm-dev/c/ef3mKzAdJ7U/m/1shV64BYBAAJ?pli=1 https://groups.google.com/g/llvm-dev/c/ef3mKzAdJ7U/m/1shV64B...