Lines Matching refs:os

324       Output_section* os = *p;  in read_sections()  local
326 info.output_section = os; in read_sections()
327 info.address = os->is_address_valid() ? os->address() : 0; in read_sections()
328 info.data_size = os->is_data_size_valid() ? os->data_size() : -1; in read_sections()
329 info.offset = os->is_offset_valid()? os->offset() : -1 ; in read_sections()
345 Output_section* os = *p; in verify_sections() local
346 uint64_t address = os->is_address_valid() ? os->address() : 0; in verify_sections()
347 off_t data_size = os->is_data_size_valid() ? os->data_size() : -1; in verify_sections()
348 off_t offset = os->is_offset_valid()? os->offset() : -1 ; in verify_sections()
352 gold_fatal("Section_info of %s missing.\n", os->name()); in verify_sections()
355 if (os != info.output_section) in verify_sections()
357 info.output_section->name(), os->name()); in verify_sections()
361 gold_fatal("Section %s changed.\n", os->name()); in verify_sections()
852 Output_section* os = NULL; in get_output_section() local
865 os = same_name; in get_output_section()
875 os = p->second; in get_output_section()
879 if (os == NULL) in get_output_section()
880 os = this->make_output_section(name, type, flags, order, is_relro); in get_output_section()
882 ins.first->second = os; in get_output_section()
883 return os; in get_output_section()
1003 Output_section* os = this->make_output_section(name, type, flags, in choose_output_section() local
1006 os->set_found_in_sections_clause(); in choose_output_section()
1011 os->set_is_noload(); in choose_output_section()
1016 if ((os->flags() & elfcpp::SHF_ALLOC) == 0 in choose_output_section()
1017 && os->is_address_valid()) in choose_output_section()
1019 gold_assert(os->address() == 0 in choose_output_section()
1020 && !os->is_offset_valid() in choose_output_section()
1021 && !os->is_data_size_valid()); in choose_output_section()
1022 os->reset_address_and_file_offset(); in choose_output_section()
1026 *output_section_slot = os; in choose_output_section()
1027 return os; in choose_output_section()
1105 Output_section* os = this->get_output_section(name, name_key, sh_type, in init_fixed_output_section() local
1107 os->set_fixed_layout(sh_addr, sh_offset, sh_size, sh_addralign); in init_fixed_output_section()
1110 return os; in init_fixed_output_section()
1165 Output_section* os; in layout() local
1170 os = this->make_output_section(name, sh_type, shdr.get_sh_flags(), in layout()
1183 os = this->choose_output_section(object, name, sh_type, in layout()
1197 os = this->get_output_section(os_name, name_key, sh_type, flags, in layout()
1199 if (!os->is_unique_segment()) in layout()
1201 os->set_is_unique_segment(); in layout()
1202 os->set_extra_segment_flags(it->second->flags); in layout()
1203 os->set_segment_alignment(it->second->align); in layout()
1206 if (os == NULL) in layout()
1225 os->set_must_sort_attached_input_sections(); in layout()
1234 os->set_must_sort_attached_input_sections(); in layout()
1246 && strcmp(os->name(), ".init_array") == 0) in layout()
1249 && strcmp(os->name(), ".fini_array") == 0))) in layout()
1254 elfcpp::Elf_Xword orig_flags = os->flags(); in layout()
1256 *off = os->add_input_section(this, object, shndx, name, shdr, reloc_shndx, in layout()
1264 os->flags() & (elfcpp::SHF_WRITE | elfcpp::SHF_EXECINSTR); in layout()
1266 os->set_order(this->default_section_order(os, false)); in layout()
1271 return os; in layout()
1309 Output_section* os; in layout_reloc() local
1312 os = this->choose_output_section(object, name.c_str(), sh_type, in layout_reloc()
1318 os = this->make_output_section(n, sh_type, shdr.get_sh_flags(), in layout_reloc()
1322 os->set_should_link_to_symtab(); in layout_reloc()
1323 os->set_info_section(data_section); in layout_reloc()
1328 os->set_entsize(elfcpp::Elf_sizes<size>::rel_size); in layout_reloc()
1335 os->set_entsize(elfcpp::Elf_sizes<size>::rela_size); in layout_reloc()
1343 os->add_output_section_data(posd); in layout_reloc()
1346 return os; in layout_reloc()
1365 Output_section* os = this->make_output_section(group_section_name, in layout_group() local
1374 os->set_info_symndx(sym); in layout_group()
1384 this->group_signatures_.push_back(Group_signature(os, signature)); in layout_group()
1387 os->set_should_link_to_symtab(); in layout_group()
1388 os->set_entsize(4); in layout_group()
1395 os->add_output_section_data(posd); in layout_group()
1418 Output_section* os = this->make_eh_frame_section(object); in layout_eh_frame() local
1419 if (os == NULL) in layout_eh_frame()
1422 gold_assert(this->eh_frame_section_ == os); in layout_eh_frame()
1424 elfcpp::Elf_Xword orig_flags = os->flags(); in layout_eh_frame()
1442 os->update_flags_for_input_section(shdr.get_sh_flags()); in layout_eh_frame()
1446 != (os->flags() & (elfcpp::SHF_WRITE | elfcpp::SHF_EXECINSTR))) in layout_eh_frame()
1448 os->set_is_relro(); in layout_eh_frame()
1449 os->set_order(ORDER_RELRO); in layout_eh_frame()
1453 return os; in layout_eh_frame()
1463 os->add_output_section_data(this->eh_frame_data_); in layout_eh_frame()
1470 *off = os->add_input_section(this, object, shndx, ".eh_frame", shdr, in layout_eh_frame()
1475 != (os->flags() & (elfcpp::SHF_WRITE | elfcpp::SHF_EXECINSTR))) in layout_eh_frame()
1476 os->set_order(this->default_section_order(os, false)); in layout_eh_frame()
1478 return os; in layout_eh_frame()
1504 Output_section* os = this->choose_output_section(object, ".eh_frame", in make_eh_frame_section() local
1508 if (os == NULL) in make_eh_frame_section()
1513 this->eh_frame_section_ = os; in make_eh_frame_section()
1528 Eh_frame_hdr* hdr_posd = new Eh_frame_hdr(os, in make_eh_frame_section()
1548 return os; in make_eh_frame_section()
1563 Output_section* os = this->make_eh_frame_section(NULL); in add_eh_frame_for_plt() local
1564 if (os == NULL) in add_eh_frame_for_plt()
1570 os->add_output_section_data(this->eh_frame_data_); in add_eh_frame_for_plt()
1590 Output_section* os = this->choose_output_section(NULL, ".gdb_index", in add_to_gdb_index() local
1594 if (os == NULL) in add_to_gdb_index()
1597 this->gdb_index_data_ = new Gdb_index(os); in add_to_gdb_index()
1598 os->add_output_section_data(this->gdb_index_data_); in add_to_gdb_index()
1599 os->set_after_input_sections(); in add_to_gdb_index()
1616 Output_section* os = this->choose_output_section(NULL, name, type, flags, in add_output_section_data() local
1618 if (os != NULL) in add_output_section_data()
1619 os->add_output_section_data(posd); in add_output_section_data()
1620 return os; in add_output_section_data()
1646 Output_section* os; in make_output_section() local
1650 os = new Output_compressed_section(&parameters->options(), name, type, in make_output_section()
1656 os = this->debug_abbrev_ = new Output_reduced_debug_abbrev_section( in make_output_section()
1665 os = this->debug_info_ = new Output_reduced_debug_info_section( in make_output_section()
1686 os = target->make_output_section(name, type, flags); in make_output_section()
1720 os->set_is_relro(); in make_output_section()
1723 order = this->default_section_order(os, is_relro_local); in make_output_section()
1725 os->set_order(order); in make_output_section()
1727 parameters->target().new_output_section(os); in make_output_section()
1729 this->section_list_.push_back(os); in make_output_section()
1741 os->set_may_sort_attached_input_sections(); in make_output_section()
1752 os->set_may_sort_attached_input_sections(); in make_output_section()
1756 os->set_must_sort_attached_input_sections(); in make_output_section()
1781 os->set_is_patch_space_allowed(); in make_output_section()
1788 os->set_free_space_fill(new Output_fill_debug_info(false)); in make_output_section()
1790 os->set_free_space_fill(new Output_fill_debug_info(true)); in make_output_section()
1792 os->set_free_space_fill(new Output_fill_debug_line()); in make_output_section()
1799 this->attach_section_to_segment(&parameters->target(), os); in make_output_section()
1801 return os; in make_output_section()
1811 Layout::default_section_order(Output_section* os, bool is_relro_local) in default_section_order() argument
1813 gold_assert((os->flags() & elfcpp::SHF_ALLOC) != 0); in default_section_order()
1814 bool is_write = (os->flags() & elfcpp::SHF_WRITE) != 0; in default_section_order()
1815 bool is_execinstr = (os->flags() & elfcpp::SHF_EXECINSTR) != 0; in default_section_order()
1818 switch (os->type()) in default_section_order()
1846 if ((os->flags() & elfcpp::SHF_TLS) != 0) in default_section_order()
1853 if (strcmp(os->name(), ".init") == 0) in default_section_order()
1855 else if (strcmp(os->name(), ".fini") == 0) in default_section_order()
1861 if (os->is_relro()) in default_section_order()
1864 if (os->is_small_section()) in default_section_order()
1866 if (os->is_large_section()) in default_section_order()
1889 Layout::attach_section_to_segment(const Target* target, Output_section* os) in attach_section_to_segment() argument
1891 if ((os->flags() & elfcpp::SHF_ALLOC) == 0) in attach_section_to_segment()
1892 this->unattached_section_list_.push_back(os); in attach_section_to_segment()
1894 this->attach_allocated_section_to_segment(target, os); in attach_section_to_segment()
1901 Output_section* os) in attach_allocated_section_to_segment() argument
1903 elfcpp::Elf_Xword flags = os->flags(); in attach_allocated_section_to_segment()
1922 seg_flags |= os->extra_segment_flags(); in attach_allocated_section_to_segment()
1926 bool is_address_set = parameters->options().section_start(os->name(), &addr); in attach_allocated_section_to_segment()
1936 if (!os->is_unique_segment()) in attach_allocated_section_to_segment()
1956 if ((os->type() == elfcpp::SHT_NOBITS) in attach_allocated_section_to_segment()
1960 if (os->is_large_data_section() && !(*p)->is_large_data_segment()) in attach_allocated_section_to_segment()
1968 (*p)->add_initial_output_data(os); in attach_allocated_section_to_segment()
1974 (*p)->add_output_section_to_load(this, os, seg_flags); in attach_allocated_section_to_segment()
1980 || os->is_unique_segment()) in attach_allocated_section_to_segment()
1984 if (os->is_large_data_section()) in attach_allocated_section_to_segment()
1986 oseg->add_output_section_to_load(this, os, seg_flags); in attach_allocated_section_to_segment()
1991 if (os->is_unique_segment()) in attach_allocated_section_to_segment()
1994 if (os->segment_alignment() != 0) in attach_allocated_section_to_segment()
1995 oseg->set_minimum_p_align(os->segment_alignment()); in attach_allocated_section_to_segment()
2001 if (os->type() == elfcpp::SHT_NOTE) in attach_allocated_section_to_segment()
2012 (*p)->add_output_section_to_nonload(os, seg_flags); in attach_allocated_section_to_segment()
2021 oseg->add_output_section_to_nonload(os, seg_flags); in attach_allocated_section_to_segment()
2031 this->tls_segment_->add_output_section_to_nonload(os, seg_flags); in attach_allocated_section_to_segment()
2036 if (os->is_relro() && parameters->options().relro()) in attach_allocated_section_to_segment()
2041 this->relro_segment_->add_output_section_to_nonload(os, seg_flags); in attach_allocated_section_to_segment()
2047 if (strcmp(os->name(), ".interp") == 0 in attach_allocated_section_to_segment()
2055 this->interp_segment_->add_output_section_to_nonload(os, seg_flags); in attach_allocated_section_to_segment()
2070 Output_section* os = this->make_output_section(name, elfcpp::SHT_PROGBITS, in make_output_section_for_script() local
2073 os->set_found_in_sections_clause(); in make_output_section_for_script()
2075 os->set_is_noload(); in make_output_section_for_script()
2076 return os; in make_output_section_for_script()
2995 Output_section* os = this->choose_output_section(NULL, section_name, in create_note() local
2998 if (os == NULL) in create_note()
3004 os->add_output_section_data(posd); in create_note()
3008 return os; in create_note()
3024 Output_section* os = this->create_note("GNU", elfcpp::NT_GNU_GOLD_VERSION, in create_gold_note() local
3027 if (os == NULL) in create_gold_note()
3031 os->add_output_section_data(posd); in create_gold_note()
3036 os->add_output_section_data(posd); in create_gold_note()
3168 Output_section* os = this->create_note("GNU", elfcpp::NT_GNU_BUILD_ID, in create_build_id() local
3171 if (os == NULL) in create_build_id()
3180 os->add_output_section_data(posd); in create_build_id()
3185 os->add_output_section_data(posd); in create_build_id()
3194 os->add_output_section_data(this->build_id_note_); in create_build_id()
4188 Output_section* os = this->make_output_section(name, elfcpp::SHT_STRTAB, 0, in create_shstrtab() local
4197 os->set_after_input_sections(); in create_shstrtab()
4201 os->add_output_section_data(posd); in create_shstrtab()
4203 return os; in create_shstrtab()