Re: objtool query: section start/end symbols?
From: Rasmus Villemoes
Date: Fri Jun 07 2024 - 05:53:01 EST
On 06/06/2024 20.42, Linus Torvalds wrote:
> So this is related to my currently very ugly hack at
>
> https://lore.kernel.org/all/CAHk-=whFSz=usMPHHGAQBnJRVAFfuH4gFHtgyLe0YET75zYRzA@xxxxxxxxxxxxxx/
>
> where I'm trying to do "runtime constants".
FWIW, I did a POC some years ago but either never managed to send it, or
never got a response. It did boot in virtme and I managed to get gdb to
do disassembly to show that the dentry hash lookup did become a 'shift
immediate'.
https://github.com/Villemoes/linux/tree/rai
IIRC, I didn't bother with updating users when the boottime value was
settled, but just had a single at-the-end-of-init call to update all
sites; in the meantime, use sites were implemented as a jump to a piece
of code that did the dynamic load of the constants.
Rasmus