Lines Matching defs:sections

405 static void handleSectionGroup(ArrayRef<InputSectionBase *> sections,
409 if (index >= sections.size())
411 if (InputSectionBase *s = sections[index])
427 InputSectionBase *s = sections[index];
476 static const Elf_Shdr *findSection(ArrayRef<Elf_Shdr> sections, uint32_t type) {
477 for (const Elf_Shdr &sec : sections)
512 ArrayRef<Elf_Shdr> sections = CHECK2(obj.sections(), this);
513 elfShdrs = sections.data();
514 numELFShdrs = sections.size();
518 findSection(sections, k == SharedKind ? SHT_DYNSYM : SHT_SYMTAB);
532 stringTable = CHECK2(obj.getStringTableForSymtab(*symtabSec, sections), this);
556 sections.resize(size);
578 sections[i] = createInputSection(
586 sections[secIndex] = &InputSection::discarded;
608 sections[i] = &InputSection::discarded;
619 sections[i] = &InputSection::discarded;
632 // attribute sections.
636 sections[i] = ctx.in.attributes.get();
643 // remove all SHT_AARCH64_MEMTAG_GLOBALS_STATIC sections as they're unused
648 sections[i] = &InputSection::discarded;
661 StringRef ObjFile<ELFT>::getShtGroupSignature(ArrayRef<Elf_Shdr> sections,
672 // On a regular link we don't merge sections if -O0 (default is -O1). This
676 // Doing the same for -r would create a problem as it would combine sections
679 // usable SHF_MERGE sections, tools like (llvm-)?dwarfdump get confused when
681 // SHF_MERGE sections based both on their name and sh_entsize, but that seems
723 sections.resize(numELFShdrs);
743 if (this->sections[i] == &InputSection::discarded)
748 // SHF_EXCLUDE'ed sections are discarded by the linker. However,
749 // if -r is given, we'll let the final link discard such sections.
769 this->sections[i] = &InputSection::discarded;
776 sections[i] = &InputSection::discarded;
803 this->sections[i] =
812 sections[i] = &InputSection::discarded;
817 this->sections[i] =
823 Err(ctx) << this->sections[i] << ": unknown section type 0x"
830 // 1) handle SHF_LINK_ORDER sections.
831 // 2) create relocation sections. In some cases the section header index of a
835 // relocation sections until now.
837 if (this->sections[i] == &InputSection::discarded)
846 // sections.
852 // ELF spec allows mergeable sections with relocations, but they are rare,
853 // and it is in practice hard to merge such sections by contents, because
855 // simply handle such sections as non-mergeable ones. Degrading like this
861 sections[info] = s;
866 << ": multiple relocation sections to one section are "
870 // Relocation sections are usually removed from the output, so return
878 // --gc-sections), the relocation section should be discarded as well.
880 sections[i] = isec;
892 linkSec = this->sections[sec.sh_link];
901 InputSection *isec = cast<InputSection>(this->sections[i]);
911 handleSectionGroup<ELFT>(this->sections, entries);
995 if (info < this->sections.size()) {
996 InputSectionBase *target = this->sections[info];
1032 // .note.GNU-stack sections are, with one exception, ignored. Report
1080 // Strip existing .note.gnu.build-id sections so that the output won't have
1082 // object files normally don't have .build-id sections, but you can create
1148 // sections) can trigger recursive extract. Process defined symbols first so
1181 if (LLVM_UNLIKELY(secIdx >= sections.size())) {
1189 InputSectionBase *sec = sections[secIdx];
1249 if (LLVM_UNLIKELY(secIdx >= sections.size())) {
1253 InputSectionBase *sec = sections[secIdx];
1419 static uint64_t getAlignment(ArrayRef<typename ELFT::Shdr> sections,
1424 if (0 < sym.st_shndx && sym.st_shndx < sections.size())
1425 ret = std::min<uint64_t>(ret, sections[sym.st_shndx].sh_addralign);
1453 ArrayRef<Elf_Shdr> sections = getELFShdrs<ELFT>();
1461 for (const Elf_Shdr &sec : sections) {
1597 uint32_t alignment = getAlignment<ELFT>(sections, sym);
1842 sections.push_back(section);