News for hackers. Stuff that matters.
Re:SSHD: Random boot time relinking, OpenBSD by theamk on Friday January 20, 2023 @10:23AM (#34454300)
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.

Re:SSHD: Random boot time relinking, OpenBSD by wolf550e on Friday January 20, 2023 @11:30AM (#34455457)