Lines Matching refs:sec

89 			       sec_ptr sec ATTRIBUTE_UNUSED,  in bfd_compress_section_contents()
130 if (uncompressed_buffer == sec->contents) in bfd_compress_section_contents()
133 sec->contents = compressed_buffer; in bfd_compress_section_contents()
134 sec->size = compressed_size; in bfd_compress_section_contents()
135 sec->compress_status = COMPRESS_SECTION_DONE; in bfd_compress_section_contents()
159 bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr) in bfd_get_full_section_contents() argument
170 if (abfd->direction != write_direction && sec->rawsize != 0) in bfd_get_full_section_contents()
171 sz = sec->rawsize; in bfd_get_full_section_contents()
173 sz = sec->size; in bfd_get_full_section_contents()
177 switch (sec->compress_status) in bfd_get_full_section_contents()
186 if (!bfd_get_section_contents (abfd, sec, p, 0, sz)) in bfd_get_full_section_contents()
201 compressed_buffer = (bfd_byte *) bfd_malloc (sec->compressed_size); in bfd_get_full_section_contents()
204 save_rawsize = sec->rawsize; in bfd_get_full_section_contents()
205 save_size = sec->size; in bfd_get_full_section_contents()
209 sec->rawsize = 0; in bfd_get_full_section_contents()
210 sec->size = sec->compressed_size; in bfd_get_full_section_contents()
211 sec->compress_status = COMPRESS_SECTION_NONE; in bfd_get_full_section_contents()
212 ret = bfd_get_section_contents (abfd, sec, compressed_buffer, in bfd_get_full_section_contents()
213 0, sec->compressed_size); in bfd_get_full_section_contents()
215 sec->rawsize = save_rawsize; in bfd_get_full_section_contents()
216 sec->size = save_size; in bfd_get_full_section_contents()
217 sec->compress_status = DECOMPRESS_SECTION_SIZED; in bfd_get_full_section_contents()
226 if (!decompress_contents (compressed_buffer, sec->compressed_size, p, sz)) in bfd_get_full_section_contents()
249 memcpy (p, sec->contents, sz); in bfd_get_full_section_contents()
271 bfd_cache_section_contents (asection *sec, void *contents) in bfd_cache_section_contents() argument
273 if (sec->compress_status == DECOMPRESS_SECTION_SIZED) in bfd_cache_section_contents()
274 sec->compress_status = COMPRESS_SECTION_DONE; in bfd_cache_section_contents()
275 sec->contents = contents; in bfd_cache_section_contents()
276 sec->flags |= SEC_IN_MEMORY; in bfd_cache_section_contents()
293 bfd_is_section_compressed (bfd *abfd, sec_ptr sec) in bfd_is_section_compressed() argument
296 unsigned int saved = sec->compress_status; in bfd_is_section_compressed()
300 sec->compress_status = COMPRESS_SECTION_NONE; in bfd_is_section_compressed()
304 compressed = (bfd_get_section_contents (abfd, sec, compressed_buffer, 0, 12) in bfd_is_section_compressed()
312 && strcmp (sec->name, ".debug_str") == 0 in bfd_is_section_compressed()
317 sec->compress_status = saved; in bfd_is_section_compressed()
341 sec_ptr sec ATTRIBUTE_UNUSED) in bfd_init_section_decompress_status()
350 if (sec->rawsize != 0 in bfd_init_section_decompress_status()
351 || sec->contents != NULL in bfd_init_section_decompress_status()
352 || sec->compress_status != COMPRESS_SECTION_NONE in bfd_init_section_decompress_status()
353 || !bfd_get_section_contents (abfd, sec, compressed_buffer, 0, 12)) in bfd_init_section_decompress_status()
376 sec->compressed_size = sec->size; in bfd_init_section_decompress_status()
377 sec->size = uncompressed_size; in bfd_init_section_decompress_status()
378 sec->compress_status = DECOMPRESS_SECTION_SIZED; in bfd_init_section_decompress_status()
403 sec_ptr sec ATTRIBUTE_UNUSED) in bfd_init_section_compress_status()
415 || sec->size == 0 in bfd_init_section_compress_status()
416 || sec->rawsize != 0 in bfd_init_section_compress_status()
417 || sec->contents != NULL in bfd_init_section_compress_status()
418 || sec->compress_status != COMPRESS_SECTION_NONE) in bfd_init_section_compress_status()
425 uncompressed_size = sec->size; in bfd_init_section_compress_status()
427 if (!bfd_get_section_contents (abfd, sec, uncompressed_buffer, in bfd_init_section_compress_status()
431 ret = bfd_compress_section_contents (abfd, sec, in bfd_init_section_compress_status()