• Home
  • Raw
  • Download

Lines Matching refs:kci

1425 	struct kcore_copy_info *kci = arg;  in kcore_copy__process_kallsyms()  local
1431 if (start > kci->last_module_symbol) in kcore_copy__process_kallsyms()
1432 kci->last_module_symbol = start; in kcore_copy__process_kallsyms()
1436 if (!kci->first_symbol || start < kci->first_symbol) in kcore_copy__process_kallsyms()
1437 kci->first_symbol = start; in kcore_copy__process_kallsyms()
1439 if (!kci->last_symbol || start > kci->last_symbol) in kcore_copy__process_kallsyms()
1440 kci->last_symbol = start; in kcore_copy__process_kallsyms()
1443 kci->stext = start; in kcore_copy__process_kallsyms()
1448 kci->etext = start; in kcore_copy__process_kallsyms()
1455 static int kcore_copy__parse_kallsyms(struct kcore_copy_info *kci, in kcore_copy__parse_kallsyms() argument
1465 if (kallsyms__parse(kallsyms_filename, kci, in kcore_copy__parse_kallsyms()
1476 struct kcore_copy_info *kci = arg; in kcore_copy__process_modules() local
1478 if (!kci->first_module || start < kci->first_module) in kcore_copy__process_modules()
1479 kci->first_module = start; in kcore_copy__process_modules()
1484 static int kcore_copy__parse_modules(struct kcore_copy_info *kci, in kcore_copy__parse_modules() argument
1494 if (modules__parse(modules_filename, kci, in kcore_copy__parse_modules()
1514 struct kcore_copy_info *kci = data; in kcore_copy__read_map() local
1517 kcore_copy__map(&kci->kernel_map, start, end, pgoff, kci->stext, in kcore_copy__read_map()
1518 kci->etext); in kcore_copy__read_map()
1520 kcore_copy__map(&kci->modules_map, start, end, pgoff, kci->first_module, in kcore_copy__read_map()
1521 kci->last_module_symbol); in kcore_copy__read_map()
1526 static int kcore_copy__read_maps(struct kcore_copy_info *kci, Elf *elf) in kcore_copy__read_maps() argument
1528 if (elf_read_maps(elf, true, kcore_copy__read_map, kci) < 0) in kcore_copy__read_maps()
1534 static int kcore_copy__calc_maps(struct kcore_copy_info *kci, const char *dir, in kcore_copy__calc_maps() argument
1537 if (kcore_copy__parse_kallsyms(kci, dir)) in kcore_copy__calc_maps()
1540 if (kcore_copy__parse_modules(kci, dir)) in kcore_copy__calc_maps()
1543 if (kci->stext) in kcore_copy__calc_maps()
1544 kci->stext = round_down(kci->stext, page_size); in kcore_copy__calc_maps()
1546 kci->stext = round_down(kci->first_symbol, page_size); in kcore_copy__calc_maps()
1548 if (kci->etext) { in kcore_copy__calc_maps()
1549 kci->etext = round_up(kci->etext, page_size); in kcore_copy__calc_maps()
1550 } else if (kci->last_symbol) { in kcore_copy__calc_maps()
1551 kci->etext = round_up(kci->last_symbol, page_size); in kcore_copy__calc_maps()
1552 kci->etext += page_size; in kcore_copy__calc_maps()
1555 kci->first_module = round_down(kci->first_module, page_size); in kcore_copy__calc_maps()
1557 if (kci->last_module_symbol) { in kcore_copy__calc_maps()
1558 kci->last_module_symbol = round_up(kci->last_module_symbol, in kcore_copy__calc_maps()
1560 kci->last_module_symbol += page_size; in kcore_copy__calc_maps()
1563 if (!kci->stext || !kci->etext) in kcore_copy__calc_maps()
1566 if (kci->first_module && !kci->last_module_symbol) in kcore_copy__calc_maps()
1569 return kcore_copy__read_maps(kci, elf); in kcore_copy__calc_maps()
1695 struct kcore_copy_info kci = { .stext = 0, }; in kcore_copy() local
1711 if (kcore_copy__calc_maps(&kci, from_dir, kcore.elf)) in kcore_copy()
1717 if (!kci.modules_map.addr) in kcore_copy()
1723 if (kcore__add_phdr(&extract, idx++, offset, kci.kernel_map.addr, in kcore_copy()
1724 kci.kernel_map.len)) in kcore_copy()
1727 if (kci.modules_map.addr) { in kcore_copy()
1728 modules_offset = offset + kci.kernel_map.len; in kcore_copy()
1730 kci.modules_map.addr, kci.modules_map.len)) in kcore_copy()
1738 if (copy_bytes(kcore.fd, kci.kernel_map.offset, extract.fd, offset, in kcore_copy()
1739 kci.kernel_map.len)) in kcore_copy()
1742 if (modules_offset && copy_bytes(kcore.fd, kci.modules_map.offset, in kcore_copy()
1744 kci.modules_map.len)) in kcore_copy()