Apparently dependent on binutils version, undefined CRC symbols may or may not make it into the final binary's symbol table. Treat undefined ones as absent instead of as having value zero. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- v2: Re-base. --- scripts/mod/modpost.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- 4.10-rc6/scripts/mod/modpost.c +++ 4.10-rc6-ignore-undef-CRC/scripts/mod/modpost.c @@ -618,7 +618,8 @@ static void handle_modversions(struct mo export = export_from_sec(info, get_secindex(info, sym)); /* CRC'd symbol */ - if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) { + if (sym->st_shndx != SHN_UNDEF && + strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) { is_crc = true; crc = (unsigned int) sym->st_value; sym_update_crc(symname + strlen(CRC_PFX), mod, crc, -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html