Lines Matching refs:section

69     // Returns the size of the content of this section.  It is used to
73 // Write the content of this section to the given file.
112 // Writer of .dynamic section.
115 void AddDynamicTag(Elf_Sword tag, Elf_Word value, const Section* section) {
117 dynamics_.push_back({tag, value, section});
133 // We are adding an address relative to a section.
213 // The section that we patch against (usually .text).
217 // Writer of .rodata section or .text section.
245 // Writer of .bss section.
258 LOG(ERROR) << "This section should not be written to the ELF file";
301 // 'relative_addr' within the given section and has the given attributes.
302 void AddSymbol(const std::string& name, const Section* section,
305 CHECK(section != nullptr);
307 symbols_.push_back({ name, section, addr, size, is_relative,
370 // We use it only for the dynsym section which has only 5 symbols.
517 // Since the .text section of an oat file contains relative references to .rodata
519 // a non-traditional layout where the .bss section is mapped independently of the
520 // .dynamic section and needs its own program header with LOAD RW.
606 // Create a list of all section which we want to write.
622 for (Section* section : other_sections_) {
623 sections.push_back(section);
627 // The first section index is 1. Index 0 is reserved for NULL.
628 // Section index is used for relative symbols and for section links.
630 // Add section name to .shstrtab.
635 // The running program does not have access to section headers
640 // The .dynamic section is found using the PT_DYNAMIC program header.
656 for (auto* section : sections) {
657 Elf_Shdr* header = section->GetHeader();
659 header->sh_size = section->GetSize();
660 header->sh_link = section->GetLink();
661 // Allocate memory for the section in the file.
666 // Allocate memory for the section during program execution.
672 LOG(INFO) << "Section " << section->GetName() << ":" << std::hex
677 // Collect section headers into continuous array for convenience.
727 // Write all headers and section content to the file.
738 for (Section* section : sections) {
739 const Elf_Shdr* header = section->GetHeader();
741 if (!SeekTo(elf_file, header->sh_offset) || !section->Write(elf_file)) {
742 LOG(INFO) << "Failed to write section " << section->GetName();
752 LOG(INFO) << "Failed to write the section headers";
758 // Adds the given section to the builder. It does not take ownership.
759 void RegisterSection(Section* section) {
760 other_sections_.push_back(section);
764 for (const auto* section : other_sections_) {
765 if (section->GetName() == name) {
766 return section;
810 // Helper - create segment header based on section header.
812 const Section& section) {
813 const Elf_Shdr* shdr = section.GetHeader();