Lines Matching refs:state

65       elf->state.ar.offset = offset + SARMAG;
67 elf->state.ar.elf_ar_hdr.ar_rawname = elf->state.ar.raw_name;
289 assert (offsetof (struct Elf, state.elf32.scns)
290 == offsetof (struct Elf, state.elf64.scns));
291 elf->state.elf32.scns.cnt = scncnt;
292 elf->state.elf32.scns.max = scnmax;
295 elf->state.elf.scnincr = 10;
312 elf->state.elf32.ehdr = ehdr;
317 elf->state.elf32.ehdr = memcpy (&elf->state.elf32.ehdr_mem, e_ident,
322 CONVERT (elf->state.elf32.ehdr_mem.e_type);
323 CONVERT (elf->state.elf32.ehdr_mem.e_machine);
324 CONVERT (elf->state.elf32.ehdr_mem.e_version);
325 CONVERT (elf->state.elf32.ehdr_mem.e_entry);
326 CONVERT (elf->state.elf32.ehdr_mem.e_phoff);
327 CONVERT (elf->state.elf32.ehdr_mem.e_shoff);
328 CONVERT (elf->state.elf32.ehdr_mem.e_flags);
329 CONVERT (elf->state.elf32.ehdr_mem.e_ehsize);
330 CONVERT (elf->state.elf32.ehdr_mem.e_phentsize);
331 CONVERT (elf->state.elf32.ehdr_mem.e_phnum);
332 CONVERT (elf->state.elf32.ehdr_mem.e_shentsize);
333 CONVERT (elf->state.elf32.ehdr_mem.e_shnum);
334 CONVERT (elf->state.elf32.ehdr_mem.e_shstrndx);
341 Elf32_Off e_shoff = elf->state.elf32.ehdr->e_shoff;
357 elf->state.elf32.shdr
362 elf->state.elf32.scns.data[cnt].index = cnt;
363 elf->state.elf32.scns.data[cnt].elf = elf;
364 elf->state.elf32.scns.data[cnt].shdr.e32 =
365 &elf->state.elf32.shdr[cnt];
366 if (likely (elf->state.elf32.shdr[cnt].sh_offset < maxsize)
367 && likely (elf->state.elf32.shdr[cnt].sh_size
368 <= maxsize - elf->state.elf32.shdr[cnt].sh_offset))
369 elf->state.elf32.scns.data[cnt].rawdata_base =
370 elf->state.elf32.scns.data[cnt].data_base =
372 + elf->state.elf32.shdr[cnt].sh_offset);
373 elf->state.elf32.scns.data[cnt].list = &elf->state.elf32.scns;
378 if (elf->state.elf32.shdr[cnt].sh_type == SHT_SYMTAB_SHNDX
379 && elf->state.elf32.shdr[cnt].sh_link < scncnt)
380 elf->state.elf32.scns.data[elf->state.elf32.shdr[cnt].sh_link].shndx_index
385 if (elf->state.elf32.scns.data[cnt].shndx_index == 0)
386 elf->state.elf32.scns.data[cnt].shndx_index = -1;
393 elf->state.elf32.scns.data[cnt].index = cnt;
394 elf->state.elf32.scns.data[cnt].elf = elf;
395 elf->state.elf32.scns.data[cnt].list = &elf->state.elf32.scns;
400 elf->state.elf32.scns_last = &elf->state.elf32.scns;
414 elf->state.elf64.ehdr = ehdr;
419 elf->state.elf64.ehdr = memcpy (&elf->state.elf64.ehdr_mem, e_ident,
424 CONVERT (elf->state.elf64.ehdr_mem.e_type);
425 CONVERT (elf->state.elf64.ehdr_mem.e_machine);
426 CONVERT (elf->state.elf64.ehdr_mem.e_version);
427 CONVERT (elf->state.elf64.ehdr_mem.e_entry);
428 CONVERT (elf->state.elf64.ehdr_mem.e_phoff);
429 CONVERT (elf->state.elf64.ehdr_mem.e_shoff);
430 CONVERT (elf->state.elf64.ehdr_mem.e_flags);
431 CONVERT (elf->state.elf64.ehdr_mem.e_ehsize);
432 CONVERT (elf->state.elf64.ehdr_mem.e_phentsize);
433 CONVERT (elf->state.elf64.ehdr_mem.e_phnum);
434 CONVERT (elf->state.elf64.ehdr_mem.e_shentsize);
435 CONVERT (elf->state.elf64.ehdr_mem.e_shnum);
436 CONVERT (elf->state.elf64.ehdr_mem.e_shstrndx);
443 Elf64_Off e_shoff = elf->state.elf64.ehdr->e_shoff;
454 elf->state.elf64.shdr
459 elf->state.elf64.scns.data[cnt].index = cnt;
460 elf->state.elf64.scns.data[cnt].elf = elf;
461 elf->state.elf64.scns.data[cnt].shdr.e64 =
462 &elf->state.elf64.shdr[cnt];
463 if (likely (elf->state.elf64.shdr[cnt].sh_offset < maxsize)
464 && likely (elf->state.elf64.shdr[cnt].sh_size
465 <= maxsize - elf->state.elf64.shdr[cnt].sh_offset))
466 elf->state.elf64.scns.data[cnt].rawdata_base =
467 elf->state.elf64.scns.data[cnt].data_base =
469 + elf->state.elf64.shdr[cnt].sh_offset);
470 elf->state.elf64.scns.data[cnt].list = &elf->state.elf64.scns;
475 if (elf->state.elf64.shdr[cnt].sh_type == SHT_SYMTAB_SHNDX
476 && elf->state.elf64.shdr[cnt].sh_link < scncnt)
477 elf->state.elf64.scns.data[elf->state.elf64.shdr[cnt].sh_link].shndx_index
482 if (elf->state.elf64.scns.data[cnt].shndx_index == 0)
483 elf->state.elf64.scns.data[cnt].shndx_index = -1;
490 elf->state.elf64.scns.data[cnt].index = cnt;
491 elf->state.elf64.scns.data[cnt].elf = elf;
492 elf->state.elf64.scns.data[cnt].list = &elf->state.elf64.scns;
497 elf->state.elf64.scns_last = &elf->state.elf64.scns;
727 elf->state.ar.long_names = (char *) memcpy (newp,
742 elf->state.ar.long_names = NULL;
745 elf->state.ar.long_names = newp;
748 elf->state.ar.long_names_len = len;
788 if (unlikely ((size_t) elf->state.ar.offset
791 - elf->state.ar.offset) < sizeof (struct ar_hdr)))
797 ar_hdr = (struct ar_hdr *) (elf->map_address + elf->state.ar.offset);
801 ar_hdr = &elf->state.ar.ar_hdr;
804 elf->state.ar.offset)
822 *((char *) mempcpy (elf->state.ar.raw_name, ar_hdr->ar_name, 16)) = '\0';
824 elf_ar_hdr = &elf->state.ar.elf_ar_hdr;
833 elf_ar_hdr->ar_name = memcpy (elf->state.ar.ar_name, "/", 2);
837 elf_ar_hdr->ar_name = memcpy (elf->state.ar.ar_name, "/SYM64/", 8);
841 elf_ar_hdr->ar_name = memcpy (elf->state.ar.ar_name, "//", 3);
848 if (unlikely (elf->state.ar.long_names == NULL
858 if (unlikely (offset >= elf->state.ar.long_names_len))
864 elf_ar_hdr->ar_name = elf->state.ar.long_names + offset;
878 endp = (char *) memccpy (elf->state.ar.ar_name, ar_hdr->ar_name,
888 elf->state.ar.ar_name[i] = '\0';
889 while (i > 0 && elf->state.ar.ar_name[--i] == ' ');
892 elf_ar_hdr->ar_name = elf->state.ar.ar_name;
944 - elf->state.ar.offset - sizeof (struct ar_hdr));
996 if (ref->state.ar.elf_ar_hdr.ar_name == NULL
1003 result = read_file (fildes, ref->state.ar.offset + sizeof (struct ar_hdr),
1004 ref->state.ar.elf_ar_hdr.ar_size, cmd, ref);
1009 result->next = ref->state.ar.children;
1010 ref->state.ar.children = result;
1032 result->state.elf.scnincr = NSCNSALLOC;
1035 assert (offsetof (struct Elf, state.elf32.scns)
1036 == offsetof (struct Elf, state.elf64.scns));
1037 result->state.elf.scns_last = &result->state.elf32.scns;
1038 result->state.elf32.scns.max = NSCNSALLOC;