| @@ -106,7 +106,7 @@ static struct instruction *prev_insn_same_sym(struct objtool_file *file, · 105 unmodified lines |
| 106 | #define for_each_insn(file, insn) \ | 106 | #define for_each_insn(file, insn) \ |
| 107 | for (struct section *__sec, *__fake = (struct section *)1; \ | 107 | for (struct section *__sec, *__fake = (struct section *)1; \ |
| 108 | __fake; __fake = NULL) \ | 108 | __fake; __fake = NULL) \ |
| 109 | for_each_sec(file, __sec) \ | 109 | for_each_sec(file->elf, __sec) \ |
| 110 | sec_for_each_insn(file, __sec, insn) | 110 | sec_for_each_insn(file, __sec, insn) |
| 111 | | 111 | |
| 112 | #define func_for_each_insn(file, func, insn) \ | 112 | #define func_for_each_insn(file, func, insn) \ |
| @@ -431,7 +431,7 @@ static int decode_instructions(struct objtool_file *file) · 318 unmodified lines |
| 431 | unsigned long offset; | 431 | unsigned long offset; |
| 432 | struct instruction *insn; | 432 | struct instruction *insn; |
| 433 | | 433 | |
| 434 | for_each_sec(file, sec) { | 434 | for_each_sec(file->elf, sec) { |
| 435 | struct instruction *insns = NULL; | 435 | struct instruction *insns = NULL; |
| 436 | u8 prev_len = 0; | 436 | u8 prev_len = 0; |
| 437 | u8 idx = 0; | 437 | u8 idx = 0; |
| @@ -857,7 +857,7 @@ static int create_cfi_sections(struct objtool_file *file) · 419 unmodified lines |
| 857 | } | 857 | } |
| 858 | | 858 | |
| 859 | idx = 0; | 859 | idx = 0; |
| 860 | for_each_sym(file, sym) { | 860 | for_each_sym(file->elf, sym) { |
| 861 | if (sym->type != STT_FUNC) | 861 | if (sym->type != STT_FUNC) |
| 862 | continue; | 862 | continue; |
| 863 | | 863 | |
| @@ -873,7 +873,7 @@ static int create_cfi_sections(struct objtool_file *file) · 9 unmodified lines |
| 873 | return -1; | 873 | return -1; |
| 874 | | 874 | |
| 875 | idx = 0; | 875 | idx = 0; |
| 876 | for_each_sym(file, sym) { | 876 | for_each_sym(file->elf, sym) { |
| 877 | if (sym->type != STT_FUNC) | 877 | if (sym->type != STT_FUNC) |
| 878 | continue; | 878 | continue; |
| 879 | | 879 | |
| @@ -2145,7 +2145,7 @@ static int add_jump_table_alts(struct objtool_file *file) · 1265 unmodified lines |
| 2145 | if (!file->rodata) | 2145 | if (!file->rodata) |
| 2146 | return 0; | 2146 | return 0; |
| 2147 | | 2147 | |
| 2148 | for_each_sym(file, func) { | 2148 | for_each_sym(file->elf, func) { |
| 2149 | if (func->type != STT_FUNC) | 2149 | if (func->type != STT_FUNC) |
| 2150 | continue; | 2150 | continue; |
| 2151 | | 2151 | |
| @@ -2451,7 +2451,7 @@ static int classify_symbols(struct objtool_file *file) · 299 unmodified lines |
| 2451 | { | 2451 | { |
| 2452 | struct symbol *func; | 2452 | struct symbol *func; |
| 2453 | | 2453 | |
| 2454 | for_each_sym(file, func) { | 2454 | for_each_sym(file->elf, func) { |
| 2455 | if (func->type == STT_NOTYPE && strstarts(func->name, ".L")) | 2455 | if (func->type == STT_NOTYPE && strstarts(func->name, ".L")) |
| 2456 | func->local_label = true; | 2456 | func->local_label = true; |
| 2457 | | 2457 | |
| @@ -2496,7 +2496,7 @@ static void mark_rodata(struct objtool_file *file) · 38 unmodified lines |
| 2496 | * | 2496 | * |
| 2497 | * .rodata.str1.* sections are ignored; they don't contain jump tables. | 2497 | * .rodata.str1.* sections are ignored; they don't contain jump tables. |
| 2498 | */ | 2498 | */ |
| 2499 | for_each_sec(file, sec) { | 2499 | for_each_sec(file->elf, sec) { |
| 2500 | if ((!strncmp(sec->name, ".rodata", 7) && | 2500 | if ((!strncmp(sec->name, ".rodata", 7) && |
| 2501 | !strstr(sec->name, ".str1.")) || | 2501 | !strstr(sec->name, ".str1.")) || |
| 2502 | !strncmp(sec->name, ".data.rel.ro", 12)) { | 2502 | !strncmp(sec->name, ".data.rel.ro", 12)) { |
| @@ -4178,7 +4178,7 @@ static int add_prefix_symbols(struct objtool_file *file) · 1675 unmodified lines |
| 4178 | struct section *sec; | 4178 | struct section *sec; |
| 4179 | struct symbol *func; | 4179 | struct symbol *func; |
| 4180 | | 4180 | |
| 4181 | for_each_sec(file, sec) { | 4181 | for_each_sec(file->elf, sec) { |
| 4182 | if (!(sec->sh.sh_flags & SHF_EXECINSTR)) | 4182 | if (!(sec->sh.sh_flags & SHF_EXECINSTR)) |
| 4183 | continue; | 4183 | continue; |
| 4184 | | 4184 | |
| @@ -4270,7 +4270,7 @@ static int validate_functions(struct objtool_file *file) · 85 unmodified lines |
| 4270 | struct section *sec; | 4270 | struct section *sec; |
| 4271 | int warnings = 0; | 4271 | int warnings = 0; |
| 4272 | | 4272 | |
| 4273 | for_each_sec(file, sec) { | 4273 | for_each_sec(file->elf, sec) { |
| 4274 | if (!(sec->sh.sh_flags & SHF_EXECINSTR)) | 4274 | if (!(sec->sh.sh_flags & SHF_EXECINSTR)) |
| 4275 | continue; | 4275 | continue; |
| 4276 | | 4276 | |
| @@ -4449,7 +4449,7 @@ static int validate_ibt(struct objtool_file *file) · 172 unmodified lines |
| 4449 | for_each_insn(file, insn) | 4449 | for_each_insn(file, insn) |
| 4450 | warnings += validate_ibt_insn(file, insn); | 4450 | warnings += validate_ibt_insn(file, insn); |
| 4451 | | 4451 | |
| 4452 | for_each_sec(file, sec) { | 4452 | for_each_sec(file->elf, sec) { |
| 4453 | | 4453 | |
| 4454 | /* Already done by validate_ibt_insn() */ | 4454 | /* Already done by validate_ibt_insn() */ |
| 4455 | if (sec->sh.sh_flags & SHF_EXECINSTR) | 4455 | if (sec->sh.sh_flags & SHF_EXECINSTR) |
| @@ -4610,7 +4610,7 @@ static void disas_warned_funcs(struct objtool_file *file) · 154 unmodified lines |
| 4610 | struct symbol *sym; | 4610 | struct symbol *sym; |
| 4611 | char *funcs = NULL, *tmp; | 4611 | char *funcs = NULL, *tmp; |
| 4612 | | 4612 | |
| 4613 | for_each_sym(file, sym) { | 4613 | for_each_sym(file->elf, sym) { |
| 4614 | if (sym->warned) { | 4614 | if (sym->warned) { |
| 4615 | if (!funcs) { | 4615 | if (!funcs) { |
| 4616 | funcs = malloc(strlen(sym->name) + 1); | 4616 | funcs = malloc(strlen(sym->name) + 1); |
| @@ -4650,7 +4650,7 @@ static int check_abs_references(struct objtool_file *file) · 33 unmodified lines |
| 4650 | struct reloc *reloc; | 4650 | struct reloc *reloc; |
| 4651 | int ret = 0; | 4651 | int ret = 0; |
| 4652 | | 4652 | |
| 4653 | for_each_sec(file, sec) { | 4653 | for_each_sec(file->elf, sec) { |
| 4654 | /* absolute references in non-loadable sections are fine */ | 4654 | /* absolute references in non-loadable sections are fine */ |
| 4655 | if (!(sec->sh.sh_flags & SHF_ALLOC)) | 4655 | if (!(sec->sh.sh_flags & SHF_ALLOC)) |
| 4656 | continue; | 4656 | continue; |