Lines Matching refs:elf
36 static void log_callback(struct elf_binary *elf, void *caller_data, in log_callback() argument
47 void xc_elf_set_logfile(xc_interface *xch, struct elf_binary *elf, in xc_elf_set_logfile() argument
49 elf_set_log(elf, log_callback, xch, verbose /* convert to bool */); in xc_elf_set_logfile()
55 struct elf_binary *elf) in xc_dom_guest_type() argument
57 uint64_t machine = elf_uval(elf, elf->ehdr, e_machine); in xc_dom_guest_type()
123 struct elf_binary elf; in xc_dom_probe_elf_kernel() local
130 rc = elf_init(&elf, dom->kernel_blob, dom->kernel_size); in xc_dom_probe_elf_kernel()
138 elf_parse_binary(&elf); in xc_dom_probe_elf_kernel()
139 rc = elf_xen_parse(&elf, &dom->parms); in xc_dom_probe_elf_kernel()
148 struct elf_binary *elf; in xc_dom_parse_elf_kernel() local
155 elf = xc_dom_malloc(dom, sizeof(*elf)); in xc_dom_parse_elf_kernel()
156 if ( elf == NULL ) in xc_dom_parse_elf_kernel()
158 dom->private_loader = elf; in xc_dom_parse_elf_kernel()
159 rc = elf_init(elf, dom->kernel_blob, dom->kernel_size) != 0 ? -EINVAL : 0; in xc_dom_parse_elf_kernel()
160 xc_elf_set_logfile(dom->xch, elf, 1); in xc_dom_parse_elf_kernel()
169 elf_parse_binary(elf); in xc_dom_parse_elf_kernel()
170 if ( elf_xen_parse(elf, &dom->parms) != 0 ) in xc_dom_parse_elf_kernel()
188 dom->guest_type = xc_dom_guest_type(dom, elf); in xc_dom_parse_elf_kernel()
196 if ( elf_check_broken(elf) ) in xc_dom_parse_elf_kernel()
198 elf_check_broken(elf)); in xc_dom_parse_elf_kernel()
205 struct elf_binary *elf = dom->private_loader; in xc_dom_load_elf_kernel() local
209 elf->dest_base = xc_dom_seg_to_ptr_pages(dom, &dom->kernel_seg, &pages); in xc_dom_load_elf_kernel()
210 if ( elf->dest_base == NULL ) in xc_dom_load_elf_kernel()
216 elf->dest_size = pages * XC_DOM_PAGE_SIZE(dom); in xc_dom_load_elf_kernel()
218 rc = elf_load_binary(elf); in xc_dom_load_elf_kernel()