• Home
  • Raw
  • Download

Lines Matching refs:reloc

446 	struct reloc *reloc;  in add_dead_ends()  local
464 list_for_each_entry(reloc, &sec->reloc_list, list) { in add_dead_ends()
465 if (reloc->sym->type != STT_SECTION) { in add_dead_ends()
469 insn = find_insn(file, reloc->sym->sec, reloc->addend); in add_dead_ends()
472 else if (reloc->addend == reloc->sym->sec->sh.sh_size) { in add_dead_ends()
473 insn = find_last_insn(file, reloc->sym->sec); in add_dead_ends()
476 reloc->sym->sec->name, reloc->addend); in add_dead_ends()
481 reloc->sym->sec->name, reloc->addend); in add_dead_ends()
499 list_for_each_entry(reloc, &sec->reloc_list, list) { in add_dead_ends()
500 if (reloc->sym->type != STT_SECTION) { in add_dead_ends()
504 insn = find_insn(file, reloc->sym->sec, reloc->addend); in add_dead_ends()
507 else if (reloc->addend == reloc->sym->sec->sh.sh_size) { in add_dead_ends()
508 insn = find_last_insn(file, reloc->sym->sec); in add_dead_ends()
511 reloc->sym->sec->name, reloc->addend); in add_dead_ends()
516 reloc->sym->sec->name, reloc->addend); in add_dead_ends()
759 struct reloc *reloc; in add_ignores() local
765 list_for_each_entry(reloc, &sec->reloc_list, list) { in add_ignores()
766 switch (reloc->sym->type) { in add_ignores()
768 func = reloc->sym; in add_ignores()
772 func = find_func_by_offset(reloc->sym->sec, reloc->addend); in add_ignores()
778 WARN("unexpected relocation symbol type in %s: %d", sec->name, reloc->sym->type); in add_ignores()
968 struct reloc *reloc; in add_ignore_alternatives() local
975 list_for_each_entry(reloc, &sec->reloc_list, list) { in add_ignore_alternatives()
976 if (reloc->sym->type != STT_SECTION) { in add_ignore_alternatives()
981 insn = find_insn(file, reloc->sym->sec, reloc->addend); in add_ignore_alternatives()
1022 static struct reloc *insn_reloc(struct objtool_file *file, struct instruction *insn) in insn_reloc()
1024 if (insn->reloc == NEGATIVE_RELOC) in insn_reloc()
1027 if (!insn->reloc) { in insn_reloc()
1028 insn->reloc = find_reloc_by_dest_range(file->elf, insn->sec, in insn_reloc()
1030 if (!insn->reloc) { in insn_reloc()
1031 insn->reloc = NEGATIVE_RELOC; in insn_reloc()
1036 return insn->reloc; in insn_reloc()
1052 struct reloc *reloc = insn_reloc(file, insn); in annotate_call_site() local
1056 sym = reloc->sym; in annotate_call_site()
1083 if (reloc) { in annotate_call_site()
1084 reloc->type = R_NONE; in annotate_call_site()
1085 elf_write_reloc(file->elf, reloc); in annotate_call_site()
1112 if (reloc) { in annotate_call_site()
1113 reloc->type = R_NONE; in annotate_call_site()
1114 elf_write_reloc(file->elf, reloc); in annotate_call_site()
1201 struct reloc *reloc; in add_jump_destinations() local
1209 reloc = insn_reloc(file, insn); in add_jump_destinations()
1210 if (!reloc) { in add_jump_destinations()
1213 } else if (reloc->sym->type == STT_SECTION) { in add_jump_destinations()
1214 dest_sec = reloc->sym->sec; in add_jump_destinations()
1215 dest_off = arch_dest_reloc_offset(reloc->addend); in add_jump_destinations()
1216 } else if (reloc->sym->retpoline_thunk) { in add_jump_destinations()
1219 } else if (reloc->sym->return_thunk) { in add_jump_destinations()
1224 add_call_dest(file, insn, reloc->sym, true); in add_jump_destinations()
1226 } else if (reloc->sym->sec->idx) { in add_jump_destinations()
1227 dest_sec = reloc->sym->sec; in add_jump_destinations()
1228 dest_off = reloc->sym->sym.st_value + in add_jump_destinations()
1229 arch_dest_reloc_offset(reloc->addend); in add_jump_destinations()
1322 struct reloc *reloc; in add_call_destinations() local
1328 reloc = insn_reloc(file, insn); in add_call_destinations()
1329 if (!reloc) { in add_call_destinations()
1349 } else if (reloc->sym->type == STT_SECTION) { in add_call_destinations()
1350 dest_off = arch_dest_reloc_offset(reloc->addend); in add_call_destinations()
1351 dest = find_call_destination(reloc->sym->sec, dest_off); in add_call_destinations()
1355 reloc->sym->sec->name, in add_call_destinations()
1362 } else if (reloc->sym->retpoline_thunk) { in add_call_destinations()
1366 add_call_dest(file, insn, reloc->sym, false); in add_call_destinations()
1451 struct reloc *alt_reloc; in handle_group_alt()
1531 struct reloc *reloc = insn_reloc(file, orig_insn); in handle_jump_alt() local
1533 if (reloc) { in handle_jump_alt()
1534 reloc->type = R_NONE; in handle_jump_alt()
1535 elf_write_reloc(file->elf, reloc); in handle_jump_alt()
1648 struct reloc *table) in add_jump_table()
1650 struct reloc *reloc = table; in add_jump_table() local
1660 list_for_each_entry_from(reloc, &table->sec->reloc_list, list) { in add_jump_table()
1663 if (reloc != table && reloc->jump_table_start) in add_jump_table()
1667 if (prev_offset && reloc->offset != prev_offset + 8) in add_jump_table()
1671 if (reloc->sym->sec == pfunc->sec && in add_jump_table()
1672 reloc->addend == pfunc->offset) in add_jump_table()
1675 dest_insn = find_insn(file, reloc->sym->sec, reloc->addend); in add_jump_table()
1691 prev_offset = reloc->offset; in add_jump_table()
1707 static struct reloc *find_jump_table(struct objtool_file *file, in find_jump_table()
1711 struct reloc *table_reloc; in find_jump_table()
1754 struct reloc *reloc; in mark_func_jump_tables() local
1777 reloc = find_jump_table(file, func, insn); in mark_func_jump_tables()
1778 if (reloc) { in mark_func_jump_tables()
1779 reloc->jump_table_start = true; in mark_func_jump_tables()
1780 insn->jump_table = reloc; in mark_func_jump_tables()
1846 struct reloc *reloc; in read_unwind_hints() local
1853 relocsec = sec->reloc; in read_unwind_hints()
1869 reloc = find_reloc_by_dest(file->elf, sec, i * sizeof(*hint)); in read_unwind_hints()
1870 if (!reloc) { in read_unwind_hints()
1875 insn = find_insn(file, reloc->sym->sec, reloc->addend); in read_unwind_hints()
1935 struct reloc *reloc; in read_retpoline_hints() local
1941 list_for_each_entry(reloc, &sec->reloc_list, list) { in read_retpoline_hints()
1942 if (reloc->sym->type != STT_SECTION) { in read_retpoline_hints()
1947 insn = find_insn(file, reloc->sym->sec, reloc->addend); in read_retpoline_hints()
1972 struct reloc *reloc; in read_instr_hints() local
1978 list_for_each_entry(reloc, &sec->reloc_list, list) { in read_instr_hints()
1979 if (reloc->sym->type != STT_SECTION) { in read_instr_hints()
1984 insn = find_insn(file, reloc->sym->sec, reloc->addend); in read_instr_hints()
1997 list_for_each_entry(reloc, &sec->reloc_list, list) { in read_instr_hints()
1998 if (reloc->sym->type != STT_SECTION) { in read_instr_hints()
2003 insn = find_insn(file, reloc->sym->sec, reloc->addend); in read_instr_hints()
2019 struct reloc *reloc; in read_intra_function_calls() local
2025 list_for_each_entry(reloc, &sec->reloc_list, list) { in read_intra_function_calls()
2028 if (reloc->sym->type != STT_SECTION) { in read_intra_function_calls()
2034 insn = find_insn(file, reloc->sym->sec, reloc->addend); in read_intra_function_calls()