Instead of relying on a dodgy dd hack to copy the image code size from the uncompressed image's PE header to the end of the compressed image, let's grab the code size from the symbol that is injected into the ELF object by the Kbuild rules that generate the compressed payload. Signed-...
/tmp/cc5U21AC.o:(.text.init+0x20): relocation truncated to fit: R_RISCV_PCREL_HI20 against undefined symbol `mtvec_handler' ($RISCV)/riscv64-unknown-elf/bin/ld: final link failed: Symbol needs debug section which does not exist Patching binutils and rebuilding the toolchain seems to...