Lines Matching refs:current
2940 asection *current; in coff_compute_section_file_positions() local
3026 for (current = abfd->sections; current != NULL; current = current->next) in coff_compute_section_file_positions()
3027 if (current->reloc_count >= 0xffff || current->lineno_count >= 0xffff) in coff_compute_section_file_positions()
3046 for (current = abfd->sections; current != NULL; current = current->next) in coff_compute_section_file_positions()
3056 for (current = abfd->sections; current != NULL; current = current->next) in coff_compute_section_file_positions()
3058 section_list[i] = current; in coff_compute_section_file_positions()
3072 current = section_list[i]; in coff_compute_section_file_positions()
3073 bfd_section_list_append (abfd, current); in coff_compute_section_file_positions()
3080 if (current->size == 0) in coff_compute_section_file_positions()
3087 current->target_index = 1; in coff_compute_section_file_positions()
3090 current->target_index = target_index++; in coff_compute_section_file_positions()
3101 for (current = abfd->sections; current != NULL; current = current->next) in coff_compute_section_file_positions()
3102 current->target_index = target_index++; in coff_compute_section_file_positions()
3107 for (current = abfd->sections; in coff_compute_section_file_positions()
3108 current != NULL; in coff_compute_section_file_positions()
3109 current = current->next) in coff_compute_section_file_positions()
3114 if (coff_section_data (abfd, current) == NULL) in coff_compute_section_file_positions()
3118 current->used_by_bfd = bfd_zalloc (abfd, amt); in coff_compute_section_file_positions()
3119 if (current->used_by_bfd == NULL) in coff_compute_section_file_positions()
3122 if (pei_section_data (abfd, current) == NULL) in coff_compute_section_file_positions()
3126 coff_section_data (abfd, current)->tdata = bfd_zalloc (abfd, amt); in coff_compute_section_file_positions()
3127 if (coff_section_data (abfd, current)->tdata == NULL) in coff_compute_section_file_positions()
3130 if (pei_section_data (abfd, current)->virt_size == 0) in coff_compute_section_file_positions()
3131 pei_section_data (abfd, current)->virt_size = current->size; in coff_compute_section_file_positions()
3135 if (!(current->flags & SEC_HAS_CONTENTS)) in coff_compute_section_file_positions()
3140 if (current->size == 0) in coff_compute_section_file_positions()
3164 if (!strcmp (current->name, _TEXT) in coff_compute_section_file_positions()
3165 || !strcmp (current->name, _DATA)) in coff_compute_section_file_positions()
3170 sofar = BFD_ALIGN (sofar, 1 << current->alignment_power); in coff_compute_section_file_positions()
3172 align = 1 << current->alignment_power; in coff_compute_section_file_positions()
3173 pad = abs (current->vma - sofar) % align; in coff_compute_section_file_positions()
3184 sofar = BFD_ALIGN (sofar, 1 << current->alignment_power); in coff_compute_section_file_positions()
3197 && (current->flags & SEC_ALLOC) != 0) in coff_compute_section_file_positions()
3198 sofar += (current->vma - (bfd_vma) sofar) % page_size; in coff_compute_section_file_positions()
3200 current->filepos = sofar; in coff_compute_section_file_positions()
3204 current->size = (current->size + page_size -1) & -page_size; in coff_compute_section_file_positions()
3207 sofar += current->size; in coff_compute_section_file_positions()
3215 old_size = current->size; in coff_compute_section_file_positions()
3216 current->size = BFD_ALIGN (current->size, in coff_compute_section_file_positions()
3217 1 << current->alignment_power); in coff_compute_section_file_positions()
3218 align_adjust = current->size != old_size; in coff_compute_section_file_positions()
3219 sofar += current->size - old_size; in coff_compute_section_file_positions()
3224 sofar = BFD_ALIGN (sofar, 1 << current->alignment_power); in coff_compute_section_file_positions()
3226 current->size += sofar - old_sofar; in coff_compute_section_file_positions()
3234 if (pei_section_data (abfd, current)->virt_size < current->size) in coff_compute_section_file_positions()
3242 if (strcmp (current->name, _LIB) == 0) in coff_compute_section_file_positions()
3243 (void) bfd_set_section_vma (abfd, current, 0); in coff_compute_section_file_positions()
3246 previous = current; in coff_compute_section_file_positions()
3368 asection *current; in coff_write_object_contents() local
3404 for (current = abfd->sections; current != NULL; current = in coff_write_object_contents()
3405 current->next) in coff_write_object_contents()
3409 if (obj_pe (abfd) && current->reloc_count >= 0xffff) in coff_write_object_contents()
3412 reloc_count += current->reloc_count; in coff_write_object_contents()
3421 for (current = abfd->sections; current != NULL; current = in coff_write_object_contents()
3422 current->next) in coff_write_object_contents()
3424 if (current->lineno_count) in coff_write_object_contents()
3426 current->line_filepos = lineno_base; in coff_write_object_contents()
3427 current->moving_line_filepos = lineno_base; in coff_write_object_contents()
3428 lineno_base += current->lineno_count * bfd_coff_linesz (abfd); in coff_write_object_contents()
3431 current->line_filepos = 0; in coff_write_object_contents()
3433 if (current->reloc_count) in coff_write_object_contents()
3435 current->rel_filepos = reloc_base; in coff_write_object_contents()
3436 reloc_base += current->reloc_count * bfd_coff_relsz (abfd); in coff_write_object_contents()
3439 if (obj_pe (abfd) && current->reloc_count >= 0xffff) in coff_write_object_contents()
3444 current->rel_filepos = 0; in coff_write_object_contents()
3469 for (current = abfd->sections; in coff_write_object_contents()
3470 current != NULL; in coff_write_object_contents()
3471 current = current->next) in coff_write_object_contents()
3477 if (strcmp (current->name, ".reloc") == 0) in coff_write_object_contents()
3487 strncpy (section.s_name, current->name, SCNNMLEN); in coff_write_object_contents()
3495 len = strlen (current->name); in coff_write_object_contents()
3509 if (strcmp (current->name, _LIB) == 0) in coff_write_object_contents()
3513 section.s_vaddr = current->vma; in coff_write_object_contents()
3514 section.s_paddr = current->lma; in coff_write_object_contents()
3515 section.s_size = current->size; in coff_write_object_contents()
3517 section.s_page = coff_get_section_load_page (current); in coff_write_object_contents()
3525 if (coff_section_data (abfd, current) != NULL in coff_write_object_contents()
3526 && pei_section_data (abfd, current) != NULL) in coff_write_object_contents()
3527 section.s_paddr = pei_section_data (abfd, current)->virt_size; in coff_write_object_contents()
3534 if (current->size == 0 in coff_write_object_contents()
3535 || (current->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0) in coff_write_object_contents()
3538 section.s_scnptr = current->filepos; in coff_write_object_contents()
3540 section.s_relptr = current->rel_filepos; in coff_write_object_contents()
3541 section.s_lnnoptr = current->line_filepos; in coff_write_object_contents()
3542 section.s_nreloc = current->reloc_count; in coff_write_object_contents()
3543 section.s_nlnno = current->lineno_count; in coff_write_object_contents()
3546 if (current->reloc_count != 0) in coff_write_object_contents()
3549 if (current->lineno_count != 0) in coff_write_object_contents()
3551 if ((current->flags & SEC_DEBUGGING) != 0 in coff_write_object_contents()
3558 if (current->reloc_count >= 0xffff || current->lineno_count >= 0xffff) in coff_write_object_contents()
3566 section.s_flags = sec_to_styp_flags (current->name, current->flags); in coff_write_object_contents()
3568 if (!strcmp (current->name, _TEXT)) in coff_write_object_contents()
3569 text_sec = current; in coff_write_object_contents()
3570 else if (!strcmp (current->name, _DATA)) in coff_write_object_contents()
3571 data_sec = current; in coff_write_object_contents()
3572 else if (!strcmp (current->name, _BSS)) in coff_write_object_contents()
3573 bss_sec = current; in coff_write_object_contents()
3576 section.s_align = (current->alignment_power in coff_write_object_contents()
3577 ? 1 << current->alignment_power in coff_write_object_contents()
3582 section.s_flags |= (current->alignment_power & 0xF) << 8; in coff_write_object_contents()
3585 COFF_ENCODE_ALIGNMENT(section, current->alignment_power); in coff_write_object_contents()
3611 if ((current->flags & SEC_LINK_ONCE) != 0) in coff_write_object_contents()
3622 if ((*psym)->section != current) in coff_write_object_contents()
3631 if (strcmp ((*psym)->name, current->name) == 0) in coff_write_object_contents()
3658 switch (current->flags & SEC_LINK_DUPLICATES) in coff_write_object_contents()
3706 for (current = abfd->sections; current != NULL; current = current->next) in coff_write_object_contents()
3708 if (current->reloc_count >= 0xffff || current->lineno_count >= 0xffff) in coff_write_object_contents()
3715 strncpy (&(scnhdr.s_name[0]), current->name, 8); in coff_write_object_contents()
3716 scnhdr.s_paddr = current->reloc_count; in coff_write_object_contents()
3717 scnhdr.s_vaddr = current->lineno_count; in coff_write_object_contents()
3720 scnhdr.s_relptr = current->rel_filepos; in coff_write_object_contents()
3721 scnhdr.s_lnnoptr = current->line_filepos; in coff_write_object_contents()
3722 scnhdr.s_nreloc = current->target_index; in coff_write_object_contents()
3723 scnhdr.s_nlnno = current->target_index; in coff_write_object_contents()