Lines Matching refs:rela
301 struct rela *rela; in add_dead_ends() local
320 list_for_each_entry(rela, &sec->rela_list, list) { in add_dead_ends()
321 if (rela->sym->type != STT_SECTION) { in add_dead_ends()
325 insn = find_insn(file, rela->sym->sec, rela->addend); in add_dead_ends()
328 else if (rela->addend == rela->sym->sec->len) { in add_dead_ends()
331 if (insn->sec == rela->sym->sec) { in add_dead_ends()
339 rela->sym->sec->name, rela->addend); in add_dead_ends()
344 rela->sym->sec->name, rela->addend); in add_dead_ends()
362 list_for_each_entry(rela, &sec->rela_list, list) { in add_dead_ends()
363 if (rela->sym->type != STT_SECTION) { in add_dead_ends()
367 insn = find_insn(file, rela->sym->sec, rela->addend); in add_dead_ends()
370 else if (rela->addend == rela->sym->sec->len) { in add_dead_ends()
373 if (insn->sec == rela->sym->sec) { in add_dead_ends()
381 rela->sym->sec->name, rela->addend); in add_dead_ends()
386 rela->sym->sec->name, rela->addend); in add_dead_ends()
404 struct rela *rela; in add_ignores() local
410 list_for_each_entry(rela, &sec->rela_list, list) { in add_ignores()
411 switch (rela->sym->type) { in add_ignores()
413 func = rela->sym; in add_ignores()
417 func = find_symbol_by_offset(rela->sym->sec, rela->addend); in add_ignores()
423 WARN("unexpected relocation symbol type in %s: %d", sec->name, rela->sym->type); in add_ignores()
518 struct rela *rela; in add_ignore_alternatives() local
525 list_for_each_entry(rela, &sec->rela_list, list) { in add_ignore_alternatives()
526 if (rela->sym->type != STT_SECTION) { in add_ignore_alternatives()
531 insn = find_insn(file, rela->sym->sec, rela->addend); in add_ignore_alternatives()
549 struct rela *rela; in add_jump_destinations() local
561 rela = find_rela_by_dest_range(insn->sec, insn->offset, in add_jump_destinations()
563 if (!rela) { in add_jump_destinations()
566 } else if (rela->sym->type == STT_SECTION) { in add_jump_destinations()
567 dest_sec = rela->sym->sec; in add_jump_destinations()
568 dest_off = rela->addend + 4; in add_jump_destinations()
569 } else if (rela->sym->sec->idx) { in add_jump_destinations()
570 dest_sec = rela->sym->sec; in add_jump_destinations()
571 dest_off = rela->sym->sym.st_value + rela->addend + 4; in add_jump_destinations()
572 } else if (strstr(rela->sym->name, "_indirect_thunk_")) { in add_jump_destinations()
586 insn->call_dest = rela->sym; in add_jump_destinations()
652 struct rela *rela; in add_call_destinations() local
658 rela = find_rela_by_dest_range(insn->sec, insn->offset, in add_call_destinations()
660 if (!rela) { in add_call_destinations()
673 } else if (rela->sym->type == STT_SECTION) { in add_call_destinations()
674 insn->call_dest = find_symbol_by_offset(rela->sym->sec, in add_call_destinations()
675 rela->addend+4); in add_call_destinations()
680 rela->sym->sec->name, in add_call_destinations()
681 rela->addend + 4); in add_call_destinations()
685 insn->call_dest = rela->sym; in add_call_destinations()
899 struct rela *table) in add_jump_table()
901 struct rela *rela = table; in add_jump_table() local
911 list_for_each_entry_from(rela, &table->sec->rela_list, list) { in add_jump_table()
914 if (rela != table && rela->jump_table_start) in add_jump_table()
918 if (prev_offset && rela->offset != prev_offset + 8) in add_jump_table()
922 if (rela->sym->sec == pfunc->sec && in add_jump_table()
923 rela->addend == pfunc->offset) in add_jump_table()
926 dest_insn = find_insn(file, rela->sym->sec, rela->addend); in add_jump_table()
942 prev_offset = rela->offset; in add_jump_table()
997 static struct rela *find_jump_table(struct objtool_file *file, in find_jump_table()
1001 struct rela *text_rela, *table_rela; in find_jump_table()
1081 struct rela *rela; in mark_func_jump_tables() local
1104 rela = find_jump_table(file, func, insn); in mark_func_jump_tables()
1105 if (rela) { in mark_func_jump_tables()
1106 rela->jump_table_start = true; in mark_func_jump_tables()
1107 insn->jump_table = rela; in mark_func_jump_tables()
1162 struct rela *rela; in read_unwind_hints() local
1172 relasec = sec->rela; in read_unwind_hints()
1188 rela = find_rela_by_dest(sec, i * sizeof(*hint)); in read_unwind_hints()
1189 if (!rela) { in read_unwind_hints()
1194 insn = find_insn(file, rela->sym->sec, rela->addend); in read_unwind_hints()
1257 struct rela *rela; in read_retpoline_hints() local
1263 list_for_each_entry(rela, &sec->rela_list, list) { in read_retpoline_hints()
1264 if (rela->sym->type != STT_SECTION) { in read_retpoline_hints()
1269 insn = find_insn(file, rela->sym->sec, rela->addend); in read_retpoline_hints()