@@ -961,11 +961,15 @@ static struct rela *find_switch_table(struct objtool_file *file,
if (find_symbol_containing(file->rodata, text_rela->addend))
continue;
+ /* mov [rodata addr], %reg */
rodata_rela = find_rela_by_dest(file->rodata, text_rela->addend);
- if (!rodata_rela)
- continue;
+ if (rodata_rela)
+ return rodata_rela;
- return rodata_rela;
+ /* mov [rodata_addr](%rip), %reg */
+ rodata_rela = find_rela_by_dest(file->rodata, text_rela->addend + 4);
+ if (rodata_rela)
+ return rodata_rela;
}
return NULL;