[PATCH v2 04/15] efi/libstub: Add a general way to get symbols from the vmlinux into zboot

Jason Gunthorpe jgg at nvidia.com
Tue Nov 3 08:01:38 PST 2026


On Fri, Oct 02, 2026 at 08:31:41PM -0300, Jason Gunthorpe wrote:
> Currently the zboot stub has no access to symbols in the vmlinux. In
> contrast x86 has a voffsets.h header that allows the stub to know whatever
> symbols it wants for the decompressed image. ARM DRTM needs another 4
> symbol locations to work, and it also wants to compile the DRTM libstub
> code once and have it work in both zboot and embedded.
> 
> The current solution in arm is "code_size" from commit 45dd403da851
> ("efi/zboot: arm64: Inject kernel code size symbol into the zboot
> payload"). This is neat, but it makes the zboot and embedded cases
> work differently.
> 
> The x86 voffsets.h approach is also nice, but it can only work in zboot
> since it relies on 'nm vmlinux' to extract the locations. That's a
> circular dependency for the embedded stub.

Ard,

Did you have any further thoughts on this patch? Did the sketch you
showed me at LPC turn into anything?

It is rc1 and another month has gone by so I'd like to repost this
with all the feedback

Thanks,
Jason



More information about the linux-riscv mailing list