mbox series

[RFC,0/1] zboot: Garbage collect unused functions

Message ID 20230621114439.42851-1-alexghiti@rivosinc.com
Headers show
Series zboot: Garbage collect unused functions | expand

Message

Alexandre Ghiti June 21, 2023, 11:44 a.m. UTC
This patch is meant to solve the issue reported by lkp in [1] with the KASLR
series support for RISC-V.

The problem in [1] is caused by the addition of new functions in
efi-stub-helper.c which reference symbols that are not defined in the context
of zboot. Those functions are not used in zboot but it causes those link
errors.

I can move those new functions around so that the problem disappears, but I
believe that fixing that using the linker garbage collection is more sane.

That's an RFC, I'll include it in my KASLR series if that's the right
direction.

[1] https://lore.kernel.org/oe-kbuild-all/202306080741.ArdxyO6n-lkp@intel.com/

Alexandre Ghiti (1):
  libstub: zboot: Use -ffunction-sections + --gc-sections

 drivers/firmware/efi/libstub/Makefile       | 1 +
 drivers/firmware/efi/libstub/Makefile.zboot | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)