Lines Matching refs:elf
44 elf_getdata_rawchunk (Elf *elf, off_t offset, size_t size, Elf_Type type) in elf_getdata_rawchunk() argument
46 if (unlikely (elf == NULL)) in elf_getdata_rawchunk()
49 if (unlikely (elf->kind != ELF_K_ELF)) in elf_getdata_rawchunk()
56 if (unlikely (offset < 0 || (uint64_t) offset > elf->maximum_size in elf_getdata_rawchunk()
57 || elf->maximum_size - (uint64_t) offset < size)) in elf_getdata_rawchunk()
76 rwlock_rdlock (elf->lock); in elf_getdata_rawchunk()
78 size_t align = __libelf_type_align (elf->class, type); in elf_getdata_rawchunk()
79 if (elf->map_address != NULL) in elf_getdata_rawchunk()
82 char *rawdata = elf->map_address + elf->start_offset + offset; in elf_getdata_rawchunk()
107 if (unlikely ((size_t) pread_retry (elf->fildes, rawchunk, size, in elf_getdata_rawchunk()
108 elf->start_offset + offset) in elf_getdata_rawchunk()
122 if (elf->state.elf32.ehdr->e_ident[EI_DATA] == MY_ELFDATA) in elf_getdata_rawchunk()
154 (*__elf_xfctstom[elf->class - 1][type])(buffer, rawchunk, size, 0); in elf_getdata_rawchunk()
166 chunk->dummy_scn.elf = elf; in elf_getdata_rawchunk()
175 rwlock_unlock (elf->lock); in elf_getdata_rawchunk()
176 rwlock_wrlock (elf->lock); in elf_getdata_rawchunk()
178 chunk->next = elf->state.elf.rawchunks; in elf_getdata_rawchunk()
179 elf->state.elf.rawchunks = chunk; in elf_getdata_rawchunk()
183 rwlock_unlock (elf->lock); in elf_getdata_rawchunk()