Lines Matching refs:scn

72 __libelf_compress (Elf_Scn *scn, size_t hsize, int ei_data,  in __libelf_compress()  argument
82 Elf_Data *data = elf_getdata (scn, NULL); in __libelf_compress()
90 Elf_Data *next_data = elf_getdata (scn, data); in __libelf_compress()
143 if (gelf_xlatetof (scn->elf, &cdata, data, ei_data) == NULL) in __libelf_compress()
156 next_data = elf_getdata (scn, data); in __libelf_compress()
258 __libelf_decompress_elf (Elf_Scn *scn, size_t *size_out, size_t *addralign) in __libelf_decompress_elf() argument
261 if (gelf_getchdr (scn, &chdr) == NULL) in __libelf_decompress_elf()
282 Elf_Data *data = elf_getdata (scn, NULL); in __libelf_decompress_elf()
286 int elfclass = scn->elf->class; in __libelf_decompress_elf()
299 __libelf_reset_rawdata (Elf_Scn *scn, void *buf, size_t size, size_t align, in __libelf_reset_rawdata() argument
303 scn->rawdata.d.d_off = 0; in __libelf_reset_rawdata()
304 scn->rawdata.d.d_version = __libelf_version; in __libelf_reset_rawdata()
305 scn->rawdata.d.d_buf = buf; in __libelf_reset_rawdata()
306 scn->rawdata.d.d_size = size; in __libelf_reset_rawdata()
307 scn->rawdata.d.d_align = align; in __libelf_reset_rawdata()
308 scn->rawdata.d.d_type = type; in __libelf_reset_rawdata()
311 scn->data_list_rear = NULL; in __libelf_reset_rawdata()
312 if (scn->data_base != scn->rawdata_base) in __libelf_reset_rawdata()
313 free (scn->data_base); in __libelf_reset_rawdata()
314 scn->data_base = NULL; in __libelf_reset_rawdata()
315 if (scn->elf->map_address == NULL in __libelf_reset_rawdata()
316 || scn->rawdata_base == scn->zdata_base) in __libelf_reset_rawdata()
317 free (scn->rawdata_base); in __libelf_reset_rawdata()
319 scn->rawdata_base = buf; in __libelf_reset_rawdata()
323 elf_compress (Elf_Scn *scn, int type, unsigned int flags) in elf_compress() argument
325 if (scn == NULL) in elf_compress()
336 Elf *elf = scn->elf; in elf_compress()
349 Elf32_Shdr *shdr = elf32_getshdr (scn); in elf_compress()
359 Elf64_Shdr *shdr = elf64_getshdr (scn); in elf_compress()
393 void *out_buf = __libelf_compress (scn, hsize, elfdata, in elf_compress()
441 Elf32_Shdr *shdr = elf32_getshdr (scn); in elf_compress()
448 Elf64_Shdr *shdr = elf64_getshdr (scn); in elf_compress()
454 __libelf_reset_rawdata (scn, out_buf, new_size, 1, ELF_T_CHDR); in elf_compress()
460 scn->zdata_base = NULL; in elf_compress()
476 if (scn->zdata_base == NULL) in elf_compress()
479 void *buf_out = __libelf_decompress_elf (scn, &size_out, &addralign); in elf_compress()
483 scn->zdata_base = buf_out; in elf_compress()
484 scn->zdata_size = size_out; in elf_compress()
485 scn->zdata_align = addralign; in elf_compress()
492 Elf32_Shdr *shdr = elf32_getshdr (scn); in elf_compress()
493 shdr->sh_size = scn->zdata_size; in elf_compress()
494 shdr->sh_addralign = scn->zdata_align; in elf_compress()
499 Elf64_Shdr *shdr = elf64_getshdr (scn); in elf_compress()
500 shdr->sh_size = scn->zdata_size; in elf_compress()
501 shdr->sh_addralign = scn->zdata_align; in elf_compress()
505 __libelf_reset_rawdata (scn, scn->zdata_base, in elf_compress()
506 scn->zdata_size, scn->zdata_align, in elf_compress()