Lines Matching refs:current
2932 asection *current; in coff_compute_section_file_positions() local
3018 for (current = abfd->sections; current != NULL; current = current->next) in coff_compute_section_file_positions()
3019 if (current->reloc_count >= 0xffff || current->lineno_count >= 0xffff) in coff_compute_section_file_positions()
3038 for (current = abfd->sections; current != NULL; current = current->next) in coff_compute_section_file_positions()
3048 for (current = abfd->sections; current != NULL; current = current->next) in coff_compute_section_file_positions()
3050 section_list[i] = current; in coff_compute_section_file_positions()
3064 current = section_list[i]; in coff_compute_section_file_positions()
3065 bfd_section_list_append (abfd, current); in coff_compute_section_file_positions()
3072 if (current->size == 0) in coff_compute_section_file_positions()
3079 current->target_index = 1; in coff_compute_section_file_positions()
3082 current->target_index = target_index++; in coff_compute_section_file_positions()
3093 for (current = abfd->sections; current != NULL; current = current->next) in coff_compute_section_file_positions()
3094 current->target_index = target_index++; in coff_compute_section_file_positions()
3099 for (current = abfd->sections; in coff_compute_section_file_positions()
3100 current != NULL; in coff_compute_section_file_positions()
3101 current = current->next) in coff_compute_section_file_positions()
3106 if (coff_section_data (abfd, current) == NULL) in coff_compute_section_file_positions()
3110 current->used_by_bfd = bfd_zalloc (abfd, amt); in coff_compute_section_file_positions()
3111 if (current->used_by_bfd == NULL) in coff_compute_section_file_positions()
3114 if (pei_section_data (abfd, current) == NULL) in coff_compute_section_file_positions()
3118 coff_section_data (abfd, current)->tdata = bfd_zalloc (abfd, amt); in coff_compute_section_file_positions()
3119 if (coff_section_data (abfd, current)->tdata == NULL) in coff_compute_section_file_positions()
3122 if (pei_section_data (abfd, current)->virt_size == 0) in coff_compute_section_file_positions()
3123 pei_section_data (abfd, current)->virt_size = current->size; in coff_compute_section_file_positions()
3127 if (!(current->flags & SEC_HAS_CONTENTS)) in coff_compute_section_file_positions()
3132 if (current->size == 0) in coff_compute_section_file_positions()
3156 if (!strcmp (current->name, _TEXT) in coff_compute_section_file_positions()
3157 || !strcmp (current->name, _DATA)) in coff_compute_section_file_positions()
3162 sofar = BFD_ALIGN (sofar, 1 << current->alignment_power); in coff_compute_section_file_positions()
3164 align = 1 << current->alignment_power; in coff_compute_section_file_positions()
3165 pad = llabs (current->vma - sofar) % align; in coff_compute_section_file_positions()
3176 sofar = BFD_ALIGN (sofar, 1 << current->alignment_power); in coff_compute_section_file_positions()
3189 && (current->flags & SEC_ALLOC) != 0) in coff_compute_section_file_positions()
3190 sofar += (current->vma - (bfd_vma) sofar) % page_size; in coff_compute_section_file_positions()
3192 current->filepos = sofar; in coff_compute_section_file_positions()
3196 current->size = (current->size + page_size -1) & -page_size; in coff_compute_section_file_positions()
3199 sofar += current->size; in coff_compute_section_file_positions()
3207 old_size = current->size; in coff_compute_section_file_positions()
3208 current->size = BFD_ALIGN (current->size, in coff_compute_section_file_positions()
3209 1 << current->alignment_power); in coff_compute_section_file_positions()
3210 align_adjust = current->size != old_size; in coff_compute_section_file_positions()
3211 sofar += current->size - old_size; in coff_compute_section_file_positions()
3216 sofar = BFD_ALIGN (sofar, 1 << current->alignment_power); in coff_compute_section_file_positions()
3218 current->size += sofar - old_sofar; in coff_compute_section_file_positions()
3226 if (pei_section_data (abfd, current)->virt_size < current->size) in coff_compute_section_file_positions()
3234 if (strcmp (current->name, _LIB) == 0) in coff_compute_section_file_positions()
3235 bfd_set_section_vma (abfd, current, 0); in coff_compute_section_file_positions()
3238 previous = current; in coff_compute_section_file_positions()
3360 asection *current; in coff_write_object_contents() local
3396 for (current = abfd->sections; current != NULL; current = in coff_write_object_contents()
3397 current->next) in coff_write_object_contents()
3401 if (obj_pe (abfd) && current->reloc_count >= 0xffff) in coff_write_object_contents()
3404 reloc_count += current->reloc_count; in coff_write_object_contents()
3413 for (current = abfd->sections; current != NULL; current = in coff_write_object_contents()
3414 current->next) in coff_write_object_contents()
3416 if (current->lineno_count) in coff_write_object_contents()
3418 current->line_filepos = lineno_base; in coff_write_object_contents()
3419 current->moving_line_filepos = lineno_base; in coff_write_object_contents()
3420 lineno_base += current->lineno_count * bfd_coff_linesz (abfd); in coff_write_object_contents()
3423 current->line_filepos = 0; in coff_write_object_contents()
3425 if (current->reloc_count) in coff_write_object_contents()
3427 current->rel_filepos = reloc_base; in coff_write_object_contents()
3428 reloc_base += current->reloc_count * bfd_coff_relsz (abfd); in coff_write_object_contents()
3431 if (obj_pe (abfd) && current->reloc_count >= 0xffff) in coff_write_object_contents()
3436 current->rel_filepos = 0; in coff_write_object_contents()
3461 for (current = abfd->sections; in coff_write_object_contents()
3462 current != NULL; in coff_write_object_contents()
3463 current = current->next) in coff_write_object_contents()
3469 if (strcmp (current->name, ".reloc") == 0) in coff_write_object_contents()
3479 strncpy (section.s_name, current->name, SCNNMLEN); in coff_write_object_contents()
3487 len = strlen (current->name); in coff_write_object_contents()
3501 if (strcmp (current->name, _LIB) == 0) in coff_write_object_contents()
3505 section.s_vaddr = current->vma; in coff_write_object_contents()
3506 section.s_paddr = current->lma; in coff_write_object_contents()
3507 section.s_size = current->size; in coff_write_object_contents()
3509 section.s_page = coff_get_section_load_page (current); in coff_write_object_contents()
3517 if (coff_section_data (abfd, current) != NULL in coff_write_object_contents()
3518 && pei_section_data (abfd, current) != NULL) in coff_write_object_contents()
3519 section.s_paddr = pei_section_data (abfd, current)->virt_size; in coff_write_object_contents()
3526 if (current->size == 0 in coff_write_object_contents()
3527 || (current->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0) in coff_write_object_contents()
3530 section.s_scnptr = current->filepos; in coff_write_object_contents()
3532 section.s_relptr = current->rel_filepos; in coff_write_object_contents()
3533 section.s_lnnoptr = current->line_filepos; in coff_write_object_contents()
3534 section.s_nreloc = current->reloc_count; in coff_write_object_contents()
3535 section.s_nlnno = current->lineno_count; in coff_write_object_contents()
3538 if (current->reloc_count != 0) in coff_write_object_contents()
3541 if (current->lineno_count != 0) in coff_write_object_contents()
3543 if ((current->flags & SEC_DEBUGGING) != 0 in coff_write_object_contents()
3550 if (current->reloc_count >= 0xffff || current->lineno_count >= 0xffff) in coff_write_object_contents()
3558 section.s_flags = sec_to_styp_flags (current->name, current->flags); in coff_write_object_contents()
3560 if (!strcmp (current->name, _TEXT)) in coff_write_object_contents()
3561 text_sec = current; in coff_write_object_contents()
3562 else if (!strcmp (current->name, _DATA)) in coff_write_object_contents()
3563 data_sec = current; in coff_write_object_contents()
3564 else if (!strcmp (current->name, _BSS)) in coff_write_object_contents()
3565 bss_sec = current; in coff_write_object_contents()
3568 section.s_align = (current->alignment_power in coff_write_object_contents()
3569 ? 1 << current->alignment_power in coff_write_object_contents()
3574 section.s_flags |= (current->alignment_power & 0xF) << 8; in coff_write_object_contents()
3577 COFF_ENCODE_ALIGNMENT(section, current->alignment_power); in coff_write_object_contents()
3603 if ((current->flags & SEC_LINK_ONCE) != 0) in coff_write_object_contents()
3614 if ((*psym)->section != current) in coff_write_object_contents()
3623 if (strcmp ((*psym)->name, current->name) == 0) in coff_write_object_contents()
3650 switch (current->flags & SEC_LINK_DUPLICATES) in coff_write_object_contents()
3698 for (current = abfd->sections; current != NULL; current = current->next) in coff_write_object_contents()
3700 if (current->reloc_count >= 0xffff || current->lineno_count >= 0xffff) in coff_write_object_contents()
3707 strncpy (&(scnhdr.s_name[0]), current->name, 8); in coff_write_object_contents()
3708 scnhdr.s_paddr = current->reloc_count; in coff_write_object_contents()
3709 scnhdr.s_vaddr = current->lineno_count; in coff_write_object_contents()
3712 scnhdr.s_relptr = current->rel_filepos; in coff_write_object_contents()
3713 scnhdr.s_lnnoptr = current->line_filepos; in coff_write_object_contents()
3714 scnhdr.s_nreloc = current->target_index; in coff_write_object_contents()
3715 scnhdr.s_nlnno = current->target_index; in coff_write_object_contents()