(In reply to Andreas Faerber from comment #31) There is nothing to fix as if you have a look into the code of get_kernel_version you will see a brut force method which search for the string "Linux version " for both little and big endian case in the binary which is ... if required ... uncompressed with "/bin/gzip -dc %s 2>/dev/null" ... with the file command you can not do this, as file was not written to dump symbols from an elf binary nor symbols from a compressed elf binary. I've done an strace get_kernel_version /boot/vmlinux | & grep ^read | wc -l on PowerPC64 and this reports 351 reads with each of 32768 bytes to find the final "Linux version " ... this has nothing todo with magic headers of magic marks for elf binaries. The PowerPC64 kernel probed with the file command shows ELF 64-bit MSB shared object, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, BuildID[sha1]=0x88bcd91b88298c500c6127aae9a4756811267a47, stripped