Lines Matching refs:file

24     FILE *file;
27 /* Reads the elf header and elf program headers from a file when given a sufficiently
30 static int read_elf_headers(void *buf, vm_t *vm, FILE *file, size_t buf_size, elf_t *elf)
36 fseek(file, 0, SEEK_SET);
37 result = fread(buf, buf_size, 1, file);
69 /* Open the relocs file. */
70 ZF_LOGI("plat: opening relocs file %s", relocs_filename);
73 FILE *file = fopen(relocs_filename, "r");
74 if (!file) {
80 fseek(file, 0, SEEK_END);
81 relocs_size = ftell(file);
82 fseek(file, 0, SEEK_SET);
84 /* The relocs file is the same relocs file format used by the Linux kernel decompressor to
93 * So we work backwards from the end of the file, and modify the guest kernel OS binary.
102 /* Get the next relocation from the relocs file. */
104 fseek(file, offset, SEEK_SET);
105 size_t result = fread(&vaddr, sizeof(uint32_t), 1, file);
141 fclose(file);
147 seL4_Word dest_addr, unsigned int segment_size, unsigned int file_size, FILE *file)
198 fseek(file, source_offset, SEEK_SET);
199 size_t result = fread(copy_vaddr, copy_len, 1, file);
225 FILE *file = fopen(image_name, "r");
226 if (!file) {
231 ret = read_elf_headers(elf_file, vm, file, sizeof(elf_file), &kernel_elf);
292 ret = load_guest_segment(vm, source_offset, dest_addr, segment_size, file_size, file);
312 fclose(file);
338 fseek(pass->file, offset, SEEK_SET);
339 size_t result = fread(addr, size, 1, pass->file);
351 FILE *file = fopen(module_name, "r");
352 if (!file) {
356 fseek(file, 0, SEEK_END);
357 module_size = ftell(file);
358 fseek(file, 0, SEEK_SET);
365 boot_guest_cookie_t pass = { .vm = vm, .file = file};
368 fclose(file);