diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 472e64e95891e671b0c13c0d851e6defdc8e5b2c..46c1d239cc1b8f3882451e63c278b9b634650f7b 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -925,7 +925,11 @@ static struct rela *find_switch_table(struct objtool_file *file, if (find_symbol_containing(file->rodata, text_rela->addend)) continue; - return find_rela_by_dest(file->rodata, text_rela->addend); + rodata_rela = find_rela_by_dest(file->rodata, text_rela->addend); + if (!rodata_rela) + continue; + + return rodata_rela; } return NULL;