Lines Matching refs:os
201 const lang_output_section_statement_type *os) in unique_section_p() argument
209 return !(os != NULL in unique_section_p()
210 && strcmp (os->name, DISCARD_SECTION_NAME) == 0); in unique_section_p()
510 lang_output_section_statement_type *os; in output_section_callback_fast() local
512 os = (lang_output_section_statement_type *) output; in output_section_callback_fast()
514 if (unique_section_p (section, os)) in output_section_callback_fast()
1479 next_matching_output_section_statement (lang_output_section_statement_type *os, in next_matching_output_section_statement() argument
1485 ((char *) os in next_matching_output_section_statement()
1487 const char *name = os->name; in next_matching_output_section_statement()
1714 output_prev_sec_find (lang_output_section_statement_type *os) in output_prev_sec_find() argument
1718 for (lookup = os->prev; lookup != NULL; lookup = lookup->prev) in output_prev_sec_find()
1817 lang_output_section_statement_type *os; in lang_insert_orphan() local
1834 os = lang_enter_output_section_statement (secname, address, normal_section, in lang_insert_orphan()
1838 if (config.build_constructors && *os_tail == os) in lang_insert_orphan()
1859 add_child = &os->children; in lang_insert_orphan()
1860 lang_add_section (add_child, s, NULL, os); in lang_insert_orphan()
1893 if (after != NULL && os->bfd_section != NULL) in lang_insert_orphan()
1897 snew = os->bfd_section; in lang_insert_orphan()
2005 return os; in lang_insert_orphan()
2258 lang_output_section_statement_type *os; in exp_init_os() local
2260 os = lang_output_section_find (exp->name.name); in exp_init_os()
2261 if (os != NULL && os->bfd_section == NULL) in exp_init_os()
2262 init_os (os, 0); in exp_init_os()
2559 lang_output_section_statement_type *os; in output_section_callback() local
2561 os = (lang_output_section_statement_type *) output; in output_section_callback()
2564 if (unique_section_p (section, os)) in output_section_callback()
2575 lang_add_section (&ptr->children, section, sflag_info, os); in output_section_callback()
2582 lang_add_section (&list, section, sflag_info, os); in output_section_callback()
2612 lang_output_section_statement_type *os; in check_section_callback() local
2614 os = (lang_output_section_statement_type *) output; in check_section_callback()
2617 if (unique_section_p (section, os)) in check_section_callback()
2621 os->all_input_readonly = FALSE; in check_section_callback()
3592 lang_output_section_statement_type *os) in map_input_to_output_sections() argument
3602 wild (&s->wild_statement, target, os); in map_input_to_output_sections()
3607 os); in map_input_to_output_sections()
3636 os); in map_input_to_output_sections()
3645 switch (os->sectype) in map_input_to_output_sections()
3661 if (os->bfd_section == NULL) in map_input_to_output_sections()
3662 init_os (os, flags); in map_input_to_output_sections()
3664 os->bfd_section->flags |= flags; in map_input_to_output_sections()
3673 if (os != NULL && os->bfd_section == NULL) in map_input_to_output_sections()
3674 init_os (os, 0); in map_input_to_output_sections()
3677 if (os != NULL && os->bfd_section == NULL) in map_input_to_output_sections()
3678 init_os (os, 0); in map_input_to_output_sections()
3729 lang_output_section_statement_type *os; in process_insert_statements() local
3741 os = &(*s)->output_section_statement; in process_insert_statements()
3743 ASSERT (last_os == NULL || last_os->next == os); in process_insert_statements()
3744 last_os = os; in process_insert_statements()
3806 for (os = first_os; os != NULL; os = os->next) in process_insert_statements()
3808 os->constraint = -2 - os->constraint; in process_insert_statements()
3809 if (os->bfd_section != NULL in process_insert_statements()
3810 && os->bfd_section->owner != NULL) in process_insert_statements()
3812 last_sec = os->bfd_section; in process_insert_statements()
3816 if (os == last_os) in process_insert_statements()
3871 for (os = first_os; os != NULL; os = os->next) in process_insert_statements()
3873 os->constraint = -2 - os->constraint; in process_insert_statements()
3874 if (os == last_os) in process_insert_statements()
3886 lang_output_section_statement_type *os; in strip_excluded_output_sections() local
3897 for (os = &lang_output_section_statement.head->output_section_statement; in strip_excluded_output_sections()
3898 os != NULL; in strip_excluded_output_sections()
3899 os = os->next) in strip_excluded_output_sections()
3904 if (os->constraint < 0) in strip_excluded_output_sections()
3907 output_section = os->bfd_section; in strip_excluded_output_sections()
3938 if (!os->update_dot) in strip_excluded_output_sections()
3939 os->ignored = TRUE; in strip_excluded_output_sections()
3955 lang_output_section_statement_type *os; in lang_clear_os_map() local
3960 for (os = &lang_output_section_statement.head->output_section_statement; in lang_clear_os_map()
3961 os != NULL; in lang_clear_os_map()
3962 os = os->next) in lang_clear_os_map()
3966 if (os->constraint < 0) in lang_clear_os_map()
3969 output_section = os->bfd_section; in lang_clear_os_map()
4405 lang_output_section_statement_type *os) in print_wild_statement() argument
4446 print_statement_list (w->children.head, os); in print_wild_statement()
4453 lang_output_section_statement_type *os) in print_group() argument
4456 print_statement_list (s->children.head, os); in print_group()
4465 lang_output_section_statement_type *os) in print_statement_list() argument
4469 print_statement (s, os); in print_statement_list()
4479 lang_output_section_statement_type *os) in print_statement() argument
4494 print_statement_list (constructor_list.head, os); in print_statement()
4498 print_wild_statement (&s->wild_statement, os); in print_statement()
4525 print_assignment (&s->assignment_statement, os); in print_statement()
4540 print_group (&s->group_statement, os); in print_statement()
4796 os_region_check (lang_output_section_statement_type *os, in os_region_check() argument
4811 os->bfd_section->owner, in os_region_check()
4812 os->bfd_section->name, in os_region_check()
4820 os->bfd_section->owner, in os_region_check()
4821 os->bfd_section->name, in os_region_check()
4848 lang_output_section_statement_type *os; in lang_size_sections_1() local
4852 os = &s->output_section_statement; in lang_size_sections_1()
4853 if (os->constraint == -1) in lang_size_sections_1()
4859 if (os->addr_tree == NULL in lang_size_sections_1()
4863 os->addr_tree = exp_intop (0); in lang_size_sections_1()
4864 if (os->addr_tree != NULL) in lang_size_sections_1()
4866 os->processed_vma = FALSE; in lang_size_sections_1()
4867 exp_fold_tree (os->addr_tree, bfd_abs_section_ptr, &dot); in lang_size_sections_1()
4878 os->addr_tree, os->name); in lang_size_sections_1()
4881 if (os->bfd_section == NULL) in lang_size_sections_1()
4893 && (os->bfd_section->flags & SEC_COFF_SHARED_LIBRARY) != 0) in lang_size_sections_1()
4897 if (os->children.head == NULL in lang_size_sections_1()
4898 || os->children.head->header.next != NULL in lang_size_sections_1()
4899 || (os->children.head->header.type in lang_size_sections_1()
4902 " section %s\n"), os->name); in lang_size_sections_1()
4904 input = os->children.head->input_section.section; in lang_size_sections_1()
4905 bfd_set_section_vma (os->bfd_section->owner, in lang_size_sections_1()
4906 os->bfd_section, in lang_size_sections_1()
4908 os->bfd_section->size = input->size; in lang_size_sections_1()
4914 if (bfd_is_abs_section (os->bfd_section)) in lang_size_sections_1()
4917 ASSERT (os->bfd_section->vma == 0); in lang_size_sections_1()
4921 if (os->addr_tree == NULL) in lang_size_sections_1()
4925 if (os->region == NULL in lang_size_sections_1()
4926 || ((os->bfd_section->flags & (SEC_ALLOC | SEC_LOAD)) in lang_size_sections_1()
4927 && os->region->name_list.name[0] == '*' in lang_size_sections_1()
4928 && strcmp (os->region->name_list.name, in lang_size_sections_1()
4931 os->region = lang_memory_default (os->bfd_section); in lang_size_sections_1()
4937 if (!os->ignored in lang_size_sections_1()
4938 && !IGNORE_SECTION (os->bfd_section) in lang_size_sections_1()
4941 && strcmp (os->region->name_list.name, in lang_size_sections_1()
4962 os->bfd_section)); in lang_size_sections_1()
4967 os->bfd_section)); in lang_size_sections_1()
4970 newdot = os->region->current; in lang_size_sections_1()
4971 section_alignment = os->bfd_section->alignment_power; in lang_size_sections_1()
4974 section_alignment = os->section_alignment; in lang_size_sections_1()
4985 || os->addr_tree != NULL) in lang_size_sections_1()
4989 os->name, (unsigned long) dotdelta); in lang_size_sections_1()
4992 bfd_set_section_vma (0, os->bfd_section, newdot); in lang_size_sections_1()
4994 os->bfd_section->output_offset = 0; in lang_size_sections_1()
4997 lang_size_sections_1 (&os->children.head, os, in lang_size_sections_1()
4998 os->fill, newdot, relax, check_regions); in lang_size_sections_1()
5000 os->processed_vma = TRUE; in lang_size_sections_1()
5002 if (bfd_is_abs_section (os->bfd_section) || os->ignored) in lang_size_sections_1()
5008 ASSERT (os->bfd_section->size == 0); in lang_size_sections_1()
5011 dot = os->bfd_section->vma; in lang_size_sections_1()
5016 + TO_ADDR (os->bfd_section->size) in lang_size_sections_1()
5017 + os->block_value - 1) in lang_size_sections_1()
5018 & - (bfd_vma) os->block_value); in lang_size_sections_1()
5020 os->bfd_section->size = TO_SIZE (after - os->bfd_section->vma); in lang_size_sections_1()
5024 r = os->region; in lang_size_sections_1()
5028 if (os->load_base) in lang_size_sections_1()
5030 bfd_vma lma = exp_get_abs_int (os->load_base, 0, "load base"); in lang_size_sections_1()
5031 os->bfd_section->lma = lma; in lang_size_sections_1()
5033 else if (os->lma_region != NULL) in lang_size_sections_1()
5035 bfd_vma lma = os->lma_region->current; in lang_size_sections_1()
5037 if (os->align_lma_with_input) in lang_size_sections_1()
5046 if (os->lma_region != os->region) in lang_size_sections_1()
5047 section_alignment = os->section_alignment; in lang_size_sections_1()
5051 os->bfd_section->lma = lma; in lang_size_sections_1()
5054 && (os->bfd_section->flags & SEC_ALLOC) != 0) in lang_size_sections_1()
5066 && os->bfd_section->size != 0 in lang_size_sections_1()
5067 && dot + os->bfd_section->size <= last->vma) in lang_size_sections_1()
5077 os->name); in lang_size_sections_1()
5083 if (os->sectype == overlay_section) in lang_size_sections_1()
5093 os->bfd_section->lma = lma; in lang_size_sections_1()
5096 os->processed_lma = TRUE; in lang_size_sections_1()
5098 if (bfd_is_abs_section (os->bfd_section) || os->ignored) in lang_size_sections_1()
5109 if (((os->bfd_section->flags & SEC_HAS_CONTENTS) != 0 in lang_size_sections_1()
5110 || (os->bfd_section->flags & SEC_THREAD_LOCAL) == 0) in lang_size_sections_1()
5111 && (os->bfd_section->flags & SEC_ALLOC) != 0 in lang_size_sections_1()
5112 && (os->bfd_section->size != 0 in lang_size_sections_1()
5114 && os->bfd_section->vma != os->bfd_section->lma) in lang_size_sections_1()
5118 && os->lma_region == NULL in lang_size_sections_1()
5123 if ((os->bfd_section->flags & SEC_HAS_CONTENTS) != 0 in lang_size_sections_1()
5124 || (os->bfd_section->flags & SEC_THREAD_LOCAL) == 0 in lang_size_sections_1()
5126 dotdelta = TO_ADDR (os->bfd_section->size); in lang_size_sections_1()
5131 if (os->update_dot_tree != 0) in lang_size_sections_1()
5132 exp_fold_tree (os->update_dot_tree, bfd_abs_section_ptr, &dot); in lang_size_sections_1()
5138 if (os->region != NULL in lang_size_sections_1()
5139 && (os->bfd_section->flags & (SEC_ALLOC | SEC_LOAD))) in lang_size_sections_1()
5141 os->region->current = dot; in lang_size_sections_1()
5145 os_region_check (os, os->region, os->addr_tree, in lang_size_sections_1()
5146 os->bfd_section->vma); in lang_size_sections_1()
5148 if (os->lma_region != NULL && os->lma_region != os->region in lang_size_sections_1()
5149 && ((os->bfd_section->flags & SEC_LOAD) in lang_size_sections_1()
5150 || os->align_lma_with_input)) in lang_size_sections_1()
5152 os->lma_region->current = os->bfd_section->lma + dotdelta; in lang_size_sections_1()
5155 os_region_check (os, os->lma_region, NULL, in lang_size_sections_1()
5156 os->bfd_section->lma); in lang_size_sections_1()
5540 lang_output_section_statement_type *os; in lang_do_assignments_1() local
5542 os = &(s->output_section_statement); in lang_do_assignments_1()
5543 if (os->bfd_section != NULL && !os->ignored) in lang_do_assignments_1()
5545 dot = os->bfd_section->vma; in lang_do_assignments_1()
5547 lang_do_assignments_1 (os->children.head, in lang_do_assignments_1()
5548 os, os->fill, dot); in lang_do_assignments_1()
5551 if ((os->bfd_section->flags & SEC_HAS_CONTENTS) != 0 in lang_do_assignments_1()
5552 || (os->bfd_section->flags & SEC_THREAD_LOCAL) == 0 in lang_do_assignments_1()
5554 dot += TO_ADDR (os->bfd_section->size); in lang_do_assignments_1()
5556 if (os->update_dot_tree != NULL) in lang_do_assignments_1()
5557 exp_fold_tree (os->update_dot_tree, bfd_abs_section_ptr, &dot); in lang_do_assignments_1()
6063 lang_output_section_statement_type *os; in lang_place_orphans() local
6064 os = lang_output_section_statement_lookup (name, in lang_place_orphans()
6067 if (os->addr_tree == NULL in lang_place_orphans()
6070 os->addr_tree = exp_intop (0); in lang_place_orphans()
6071 lang_add_section (&os->children, s, NULL, os); in lang_place_orphans()
6217 lang_output_section_statement_type *os; in lang_enter_output_section_statement() local
6219 os = lang_output_section_statement_lookup (output_section_statement_name, in lang_enter_output_section_statement()
6221 current_section = os; in lang_enter_output_section_statement()
6223 if (os->addr_tree == NULL) in lang_enter_output_section_statement()
6225 os->addr_tree = address_exp; in lang_enter_output_section_statement()
6227 os->sectype = sectype; in lang_enter_output_section_statement()
6229 os->flags = SEC_NO_FLAGS; in lang_enter_output_section_statement()
6231 os->flags = SEC_NEVER_LOAD; in lang_enter_output_section_statement()
6232 os->block_value = 1; in lang_enter_output_section_statement()
6235 push_stat_ptr (&os->children); in lang_enter_output_section_statement()
6237 os->align_lma_with_input = align_with_input == ALIGN_WITH_INPUT; in lang_enter_output_section_statement()
6238 if (os->align_lma_with_input && align != NULL) in lang_enter_output_section_statement()
6241 os->subsection_alignment = in lang_enter_output_section_statement()
6243 os->section_alignment = in lang_enter_output_section_statement()
6246 os->load_base = ebase; in lang_enter_output_section_statement()
6247 return os; in lang_enter_output_section_statement()
6267 lang_output_section_statement_type *os; in lang_reset_memory_regions() local
6275 for (os = &lang_output_section_statement.head->output_section_statement; in lang_reset_memory_regions()
6276 os != NULL; in lang_reset_memory_regions()
6277 os = os->next) in lang_reset_memory_regions()
6279 os->processed_vma = FALSE; in lang_reset_memory_regions()
6280 os->processed_lma = FALSE; in lang_reset_memory_regions()
7179 lang_output_section_statement_type *os; in lang_record_phdrs() local
7192 for (os = &lang_output_section_statement.head->output_section_statement; in lang_record_phdrs()
7193 os != NULL; in lang_record_phdrs()
7194 os = os->next) in lang_record_phdrs()
7198 if (os->constraint < 0) in lang_record_phdrs()
7201 pl = os->phdrs; in lang_record_phdrs()
7206 if (os->sectype == noload_section in lang_record_phdrs()
7207 || os->bfd_section == NULL in lang_record_phdrs()
7208 || (os->bfd_section->flags & SEC_ALLOC) == 0) in lang_record_phdrs()
7227 for (tmp_os = os; tmp_os; tmp_os = tmp_os->next) in lang_record_phdrs()
7239 if (os->bfd_section == NULL) in lang_record_phdrs()
7252 secs[c] = os->bfd_section; in lang_record_phdrs()
7278 for (os = &lang_output_section_statement.head->output_section_statement; in lang_record_phdrs()
7279 os != NULL; in lang_record_phdrs()
7280 os = os->next) in lang_record_phdrs()
7284 if (os->constraint < 0 in lang_record_phdrs()
7285 || os->bfd_section == NULL) in lang_record_phdrs()
7288 for (pl = os->phdrs; in lang_record_phdrs()
7293 os->name, pl->name); in lang_record_phdrs()
7327 lang_output_section_statement_type *os; member
7367 n->os = current_section; in lang_enter_overlay_section()
7452 overlay_list->os->update_dot = 1; in lang_leave_overlay()
7453 overlay_list->os->update_dot_tree in lang_leave_overlay()
7462 if (fill != NULL && l->os->fill == NULL) in lang_leave_overlay()
7463 l->os->fill = fill; in lang_leave_overlay()
7465 l->os->region = region; in lang_leave_overlay()
7466 l->os->lma_region = lma_region; in lang_leave_overlay()
7474 l->os->load_base = lma_expr; in lang_leave_overlay()
7475 l->os->sectype = normal_section; in lang_leave_overlay()
7477 if (phdrs != NULL && l->os->phdrs == NULL) in lang_leave_overlay()
7478 l->os->phdrs = phdrs; in lang_leave_overlay()
7485 nc->name = l->os->name; in lang_leave_overlay()