Adapted repack_kernel.elf for mkelf.c