Home
last modified time | relevance | path

Searched refs:elf (Results 1 – 25 of 30) sorted by relevance

12

/xen/xen/common/libelf/
A Dlibelf-loader.c48 elf_memset_unchecked(elf, 0, sizeof(*elf)); in elf_init()
52 elf->class = elf_uval_3264(elf, elf->ehdr, e32.e_ident[EI_CLASS]); in elf_init()
53 elf->data = elf_uval_3264(elf, elf->ehdr, e32.e_ident[EI_DATA]); in elf_init()
56 offset = elf_uval(elf, elf->ehdr, e_phoff) + in elf_init()
57 elf_uval(elf, elf->ehdr, e_phentsize) * elf_phdr_count(elf); in elf_init()
66 offset = elf_uval(elf, elf->ehdr, e_shoff) + in elf_init()
67 elf_uval(elf, elf->ehdr, e_shentsize) * elf_shdr_count(elf); in elf_init()
122 elf->log_callback(elf, elf->log_caller_data, iserr, fmt, al); in elf_call_log_callback()
218 sz = elf_round_up(elf, sz + elf_uval(elf, elf->sym_tab, sh_size)); in elf_parse_bsdsyms()
220 shdr = elf_shdr_by_index(elf, elf_uval(elf, elf->sym_tab, sh_link)); in elf_parse_bsdsyms()
[all …]
A Dlibelf-tools.c132 unsigned count = elf_uval(elf, elf->ehdr, e_shnum); in elf_shdr_count()
147 return elf_uval(elf, elf->ehdr, e_phnum); in elf_phdr_count()
178 + elf_uval(elf, elf->ehdr, e_shoff) in elf_shdr_by_index()
179 + elf_uval(elf, elf->ehdr, e_shentsize) * index); in elf_shdr_by_index()
192 + elf_uval(elf, elf->ehdr, e_phoff) in elf_phdr_by_index()
193 + elf_uval(elf, elf->ehdr, e_phentsize) * index); in elf_phdr_by_index()
204 return elf_strval(elf, elf->sec_strtab + elf_uval(elf, shdr, sh_name)); in elf_section_name()
259 elf_ptrval ptr = elf_section_start(elf, elf->sym_tab); in elf_sym_by_name()
260 elf_ptrval end = elf_section_end(elf, elf->sym_tab); in elf_sym_by_name()
272 sym_name = elf_strval(elf, elf->sym_strtab + name); in elf_sym_by_name()
[all …]
A Dlibelf-dominfo.c140 str = elf_strval(elf, elf_note_desc(elf, note)); in elf_xen_parse_note()
150 val = elf_note_numeric(elf, note); in elf_xen_parse_note()
368 unsigned machine = elf_uval(elf, elf->ehdr, e_machine); in elf_xen_note_check()
378 if ( elf_uval(elf, elf->ehdr, e_machine) == EM_ARM ) in elf_xen_note_check()
397 elf_err(elf, in elf_xen_note_check()
460 parms->virt_entry = elf_uval(elf, elf->ehdr, e_entry); in elf_xen_addr_calc_check()
464 elf_parse_bsdsyms(elf, elf->pend); in elf_xen_addr_calc_check()
465 if ( elf->bsd_symtab_pend ) in elf_xen_addr_calc_check()
469 elf_msg(elf, "ELF: addresses:\n"); in elf_xen_addr_calc_check()
520 count = elf_phdr_count(elf); in elf_xen_parse()
[all …]
A Dlibelf-private.h28 #define elf_msg(elf, fmt, args ... ) \ argument
29 if (elf->verbose) printk(fmt, ## args )
30 #define elf_err(elf, fmt, args ... ) \ argument
80 #define elf_msg(elf, fmt, args ... ) \ argument
81 elf_call_log_callback(elf, 0, fmt , ## args );
82 #define elf_err(elf, fmt, args ... ) \ argument
83 elf_call_log_callback(elf, 1, fmt , ## args );
/xen/xen/common/
A Dlivepatch_elf.c66 delta = elf->hdr->e_shoff + elf->hdr->e_shnum * elf->hdr->e_shentsize; in elf_resolve_sections()
158 elf->strtab = &sec[elf->symtab->sec->sh_link]; in elf_resolve_sections()
183 sec = &elf->sec[elf->hdr->e_shstrndx]; in elf_resolve_section_names()
296 elf->name, elf->sym[i].name); in livepatch_elf_resolve_symbols()
342 elf->name, elf->sym[i].name, in livepatch_elf_resolve_symbols()
423 if ( sizeof(*elf->hdr) > elf->len ) in livepatch_header_check()
464 elf->name, elf->hdr->e_shnum); in livepatch_header_check()
469 if ( elf->hdr->e_shstrndx >= elf->hdr->e_shnum ) in livepatch_header_check()
472 elf->name, elf->hdr->e_shstrndx, elf->hdr->e_shnum); in livepatch_header_check()
476 if ( elf->hdr->e_shoff >= elf->len ) in livepatch_header_check()
[all …]
A Dlivepatch.c322 elf->name, elf->sec[i].name); in move_payload()
342 elf->name); in move_payload()
378 memcpy(elf->sec[i].load_addr, elf->sec[i].data, in move_payload()
381 elf->name, elf->sec[i].name, elf->sec[i].load_addr); in move_payload()
384 memset(elf->sec[i].load_addr, 0, elf->sec[i].sec->sh_size); in move_payload()
434 if ( !elf || !sec ) in section_ok()
558 elf->name); in check_patching_sections()
830 elf->name); in prepare_payload()
853 elf->name); in prepare_payload()
925 if ( is_payload_symbol(elf, elf->sym + i) ) in build_symbol_table()
[all …]
/xen/xen/include/xen/
A Dlibelf.h102 #define ELF_IMAGE_BASE(elf) ((elf_ptrval)(elf)->image_base) argument
231 #define elf_32bit(elf) (ELFCLASS32 == (elf)->class) argument
232 #define elf_64bit(elf) (ELFCLASS64 == (elf)->class) argument
233 #define elf_msb(elf) (ELFDATA2MSB == (elf)->data) argument
234 #define elf_lsb(elf) (ELFDATA2LSB == (elf)->data) argument
235 #define elf_swap(elf) (NATIVE_ELFDATA != (elf)->data) argument
358 elf->vcpu = v; in elf_set_vcpu()
476 if ( elf->dest_base == NULL ) in ELF_ADVANCE_DEST()
482 elf->dest_base += amount; in ELF_ADVANCE_DEST()
483 elf->dest_size -= amount; in ELF_ADVANCE_DEST()
[all …]
A Dlivepatch_elf.h41 livepatch_elf_sec_by_name(const struct livepatch_elf *elf,
43 int livepatch_elf_load(struct livepatch_elf *elf, const void *data);
44 void livepatch_elf_free(struct livepatch_elf *elf);
46 int livepatch_elf_resolve_symbols(struct livepatch_elf *elf);
47 int livepatch_elf_perform_relocs(struct livepatch_elf *elf);
A Dlivepatch.h60 int arch_livepatch_verify_elf(const struct livepatch_elf *elf);
61 bool arch_livepatch_symbol_ok(const struct livepatch_elf *elf,
63 bool arch_livepatch_symbol_deny(const struct livepatch_elf *elf,
65 int arch_livepatch_perform_rel(struct livepatch_elf *elf,
68 int arch_livepatch_perform_rela(struct livepatch_elf *elf,
A Delfstructs.h550 #define ELFNAME(x) CONCAT(elf,CONCAT(ELFSIZE,CONCAT(_,x)))
/xen/tools/xcutils/
A Dreadnotes.c66 printf("%s: %s\n", prefix, elf_strfmt(elf, elf_note_desc(elf, note))); in print_string_note()
118 switch(elf_uval(elf, note, type)) in print_notes()
181 struct elf_binary elf; in main() local
264 xc_elf_set_logfile(xch, &elf, 0); in main()
266 count = elf_phdr_count(&elf); in main()
270 phdr = elf_phdr_by_index(&elf, h); in main()
280 notes_found = print_notes(&elf, in main()
287 count = elf_shdr_count(&elf); in main()
294 notes_found = print_notes(&elf, in main()
306 elf_strfmt(&elf, elf_section_start(&elf, shdr))); in main()
[all …]
/xen/tools/libxc/
A Dxc_dom_hvmloader.c57 struct elf_binary elf; in xc_dom_probe_hvm_kernel() local
76 elf_parse_binary(&elf); in xc_dom_probe_hvm_kernel()
90 struct elf_binary *elf; in xc_dom_parse_hvm_kernel() local
97 elf = xc_dom_malloc(dom, sizeof(*elf)); in xc_dom_parse_hvm_kernel()
98 if ( elf == NULL ) in xc_dom_parse_hvm_kernel()
100 dom->private_loader = elf; in xc_dom_parse_hvm_kernel()
110 if ( !elf_32bit(elf) ) in xc_dom_parse_hvm_kernel()
118 elf_parse_binary(elf); in xc_dom_parse_hvm_kernel()
190 size_t pages = (elf->pend - elf->pstart + PAGE_SIZE - 1) >> PAGE_SHIFT; in xc_dom_load_hvm_kernel()
222 munmap(elf->dest_base, elf->dest_size); in xc_dom_load_hvm_kernel()
[all …]
A Dxc_dom_elfloader.c57 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
138 elf_parse_binary(&elf); 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()
169 elf_parse_binary(elf); in xc_dom_parse_elf_kernel()
196 if ( elf_check_broken(elf) ) in xc_dom_parse_elf_kernel()
210 if ( elf->dest_base == NULL ) in xc_dom_load_elf_kernel()
[all …]
/xen/tools/fuzz/libelf/
A Dlibelf-fuzzer.c10 struct elf_binary elf_buf, *elf; in LLVMFuzzerTestOneInput() local
13 elf = &elf_buf; in LLVMFuzzerTestOneInput()
15 memset(elf, 0, sizeof(*elf)); in LLVMFuzzerTestOneInput()
16 if ( elf_init(elf, (const char *)data, size) < 0 ) in LLVMFuzzerTestOneInput()
19 elf_parse_binary(elf); in LLVMFuzzerTestOneInput()
20 elf_xen_parse(elf, &parms); in LLVMFuzzerTestOneInput()
/xen/xen/arch/arm/arm32/
A Dlivepatch.c82 const Elf_Ehdr *hdr = elf->hdr; in arch_livepatch_verify_elf()
88 elf->name); in arch_livepatch_verify_elf()
95 elf->name, hdr->e_flags); in arch_livepatch_verify_elf()
222 int arch_livepatch_perform(struct livepatch_elf *elf, in arch_livepatch_perform() argument
260 elf->name); in arch_livepatch_perform()
263 else if ( symndx >= elf->nsym ) in arch_livepatch_perform()
266 elf->name, symndx); in arch_livepatch_perform()
269 else if ( !elf->sym[symndx].sym ) in arch_livepatch_perform()
272 elf->name, symndx); in arch_livepatch_perform()
276 val = elf->sym[symndx].sym->st_value; /* S */ in arch_livepatch_perform()
[all …]
/xen/xen/arch/x86/
A Dlivepatch.c196 const Elf_Ehdr *hdr = elf->hdr; in arch_livepatch_verify_elf()
203 elf->name); in arch_livepatch_verify_elf()
224 int arch_livepatch_perform_rel(struct livepatch_elf *elf, in arch_livepatch_perform_rel() argument
229 elf->name); in arch_livepatch_perform_rel()
249 elf->name); in arch_livepatch_perform_rela()
252 else if ( symndx >= elf->nsym ) in arch_livepatch_perform_rela()
255 elf->name, symndx); in arch_livepatch_perform_rela()
258 else if ( !elf->sym[symndx].sym ) in arch_livepatch_perform_rela()
261 elf->name, symndx); in arch_livepatch_perform_rela()
306 elf->name, ELF64_R_TYPE(r->r_info)); in arch_livepatch_perform_rela()
[all …]
/xen/xen/arch/arm/arm64/
A Dlivepatch.c69 const Elf_Ehdr *hdr = elf->hdr; in arch_livepatch_verify_elf()
75 elf->name); in arch_livepatch_verify_elf()
233 int arch_livepatch_perform_rel(struct livepatch_elf *elf, in arch_livepatch_perform_rel() argument
240 int arch_livepatch_perform_rela(struct livepatch_elf *elf, in arch_livepatch_perform_rela() argument
258 elf->name); in arch_livepatch_perform_rela()
261 else if ( symndx >= elf->nsym ) in arch_livepatch_perform_rela()
264 elf->name, symndx); in arch_livepatch_perform_rela()
267 else if ( !elf->sym[symndx].sym ) in arch_livepatch_perform_rela()
270 elf->name, symndx); in arch_livepatch_perform_rela()
469 elf->name, ELF64_R_TYPE(r->r_info)); in arch_livepatch_perform_rela()
[all …]
/xen/xen/arch/x86/pv/
A Ddom0_build.c318 struct elf_binary elf; in dom0_construct_pv() local
353 elf_set_verbose(&elf); in dom0_construct_pv()
355 elf_parse_binary(&elf); in dom0_construct_pv()
361 machine = elf_uval(&elf, elf.ehdr, e_machine); in dom0_construct_pv()
381 elf.pstart, elf.pend); in dom0_construct_pv()
382 if ( elf.bsd_symtab_pstart ) in dom0_construct_pv()
384 elf.bsd_symtab_pstart, elf.bsd_symtab_pend); in dom0_construct_pv()
409 elf_32bit(&elf) ) in dom0_construct_pv()
721 elf_set_vcpu(&elf, v); in dom0_construct_pv()
722 rc = elf_load_binary(&elf); in dom0_construct_pv()
[all …]
/xen/docs/misc/
A Dx86-xenpv-bootloader.pandoc30 * `/boot/xen/pvboot-<ARCH>.elf`
40 `/boot/xen/pvboot-<ARCH>.elf` and `/xen/pvboot-<ARCH>.elf` (in that
42 and therefore it is not necessary to search for /pvboot-<ARCH>.elf.
47 both `/boot/xen/pvboot-i386.elf` and `/boot/xen/pvboot-x86_64.elf`
A Ddump-core-format.txt8 Its format was changed to be based on ELF format because elf format is easily
28 The elf header members are set as follows
148 elf note section
150 "Xen" is used as elf note name in elf note info
244 - EI_CLASS member of elf header was changed to ELFCLASS64 independent of
249 - elf header e_ident[EI_DATA]
/xen/stubdom/
A DMakefile55 TARGET_CPPFLAGS += -isystem $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include
62 TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib
95 NEWLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libc.a
116 ZLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libz.a
138 LIBPCI_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libpci.a
149 $(INSTALL_DIR) $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include/pci && \
186 GMP_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libgmp.a
210 mkdir -p $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include && \
212 mkdir -p $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib && \
239 TPMEMU_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libtpm.a
[all …]
/xen/
A Dconfig.sub1111 os=${os:-elf}
1122 os=${os:-elf}
1507 os=elf
1538 os=elf
1541 os=elf
1556 os=elf
1562 os=elf
1596 os=elf
1599 os=elf
1602 os=elf
[all …]
/xen/xen/arch/x86/hvm/
A Ddom0_build.c497 paddr_t kernel_start = (paddr_t)elf->dest_base & PAGE_MASK; in find_memory()
498 paddr_t kernel_end = ROUNDUP((paddr_t)elf->dest_base + elf->dest_size, in find_memory()
541 struct elf_binary elf; in pvh_load_kernel() local
555 if ( (rc = elf_init(&elf, image_start, image_len)) != 0 ) in pvh_load_kernel()
561 elf_set_verbose(&elf); in pvh_load_kernel()
563 elf_parse_binary(&elf); in pvh_load_kernel()
564 if ( (rc = elf_xen_parse(&elf, &parms)) != 0 ) in pvh_load_kernel()
578 elf.dest_size = parms.virt_kend - parms.virt_kstart; in pvh_load_kernel()
580 elf_set_vcpu(&elf, v); in pvh_load_kernel()
581 rc = elf_load_binary(&elf); in pvh_load_kernel()
[all …]
/xen/xen/arch/arm/
A Dlivepatch.c111 bool arch_livepatch_symbol_ok(const struct livepatch_elf *elf, in arch_livepatch_symbol_ok() argument
/xen/tools/debugger/gdbsx/
A DREADME7 of 32 or 64bit PV or HVM elf guest binaries. It can also be run standalone,

Completed in 39 milliseconds

12