Lines Matching defs:sections

83   // by grouping sections with certain prefixes.
85 // GNU ld places text sections with prefix ".text.hot.", ".text.unknown.",
87 // We provide an option -z keep-text-section-prefix to group such sections
88 // into separate output sections. This is more flexible. See also
95 // input sections. For example, with -fsplit-machine-functions, placing the
328 // adjustOutputSections(). We do not handle such output sections.
371 // Skip such sections for now. Improve the checks if we ever
372 // need symbols from that sections to be declared early.
446 static bool matchConstraints(ArrayRef<InputSectionBase *> sections,
452 sections, [](InputSectionBase *sec) { return sec->flags & SHF_WRITE; });
462 // before sections with smaller alignments in order to reduce the
488 // Sort sections as instructed by SORT-family commands and --sort-section
512 // Compute and remember which sections the InputSectionDescription matches.
515 ArrayRef<InputSectionBase *> sections,
527 // Collects all sections that satisfy constraints of Cmd.
535 ret[i] = sections[indexes[i]];
545 for (size_t i = 0, e = sections.size(); i != e; ++i) {
548 InputSectionBase *sec = sections[i];
555 // We do not ignore SHT_REL[A] linker-synthesized sections here because
594 // Matched sections are ordered by radix sort with the keys being (SORT*,
598 // Matched sections between the previous SORT* and this SORT* are sorted
601 // Matched sections by this SORT* pattern are sorted using all 3 keys.
611 // Matched sections after the last SORT* are sorted by (--sort-alignment,
645 // cause sections to match an InputSectionDescription in more than one
647 // replace these with potential spill sections.
709 // Create output sections described by SECTIONS commands.
726 // sections satisfy a given constraint. If not, a directive is handled
739 // is given, input sections are aligned to that value, whether the
784 // sections all become potential spills when the class is referenced.
793 // Check that input sections cannot spill into or out of INSERT,
829 // Input sections cannot have a section class parent past this point; they
902 // relocation sections .rela.foo and .rela.bar for example. Most tools do
903 // not allow multiple REL[A] sections for output section. Hence we
904 // should combine these relocation sections into single output.
905 // We skip synthetic sections because it can be .rela.dyn/.rela.plt or any
906 // other REL[A] sections created by linker itself.
923 // In the first phase, input sections that match in name, type and
924 // attribute flags should be concatenated into single sections.
929 // ignored. We should not have two output .text sections just because one was
935 // Merging sections with different flags is expected by some users. One
950 // expressions like *(.foo*) can refer to multiple input sections with
951 // different flags. We cannot put them in different output sections or we
958 // sections such that the .foo sections are the only thing between the start
961 // Given the above issues, we instead merge sections by name and error on
969 // Merging two SHF_LINK_ORDER sections with different sh_link fields will
992 // Add sections that didn't match any sections command.
1017 // to create target sections first. We do not want priority handling
1018 // for synthetic sections because them are special.
1025 // In -r links, SHF_LINK_ORDER sections are added while adding their parent
1026 // sections because we need to know the parent's output section before we
1044 // If no SECTIONS command was given, we should insert sections commands
1055 llvm::TimeTraceScope timeScope("Diagnose orphan sections");
1095 // Non-allocatable sections are not part of the process image.
1119 // If at least one memory region is defined, all sections must
1149 // Assign addresses to an output section and offsets to its input sections and
1161 // Non-SHF_ALLOC sections have zero addresses.
1164 // Allow consecutive SHF_TLS SHT_NOBITS output sections. The address range
1198 // region is the default, and the two sections are in the same memory region,
1223 // layout sections. Now, we visit SectionsCommands again to fix
1246 auto &sections = cast<InputSectionDescription>(cmd)->sections;
1247 for (InputSection *isec : sections) {
1268 // Non-SHF_ALLOC sections do not affect the addresses of other OutputSections
1273 // NOBITS TLS sections are similar. Additionally save the end address.
1298 // Don't create empty output sections just for unreferenced PROVIDE
1313 // headers to sections that are allocated.
1341 // the previous sections. We copy just SHF_ALLOC and SHF_WRITE to keep the
1361 // flags to be inherited by subsequent output sections. (sec may contain
1374 // The code below may remove empty output sections. We should save the
1376 // sections which do not specify program headers.
1380 // Note: at this point the order of output sections has not been finalized,
1402 // given run some of the output sections in the script will be empty.
1403 // We could create corresponding empty output sections, but that would
1405 // We instead remove trivially empty sections. The bfd linker seems even
1448 // program headers output sections, which can be added to the first PT_LOAD
1452 // enough space for these sections, we'll remove them from the PT_LOAD segment,
1553 // Spill input sections in reverse order of address assignment to (potentially)
1571 // Input sections that have replaced a potential spill and should be removed
1583 for (InputSection *isec : reverse(isd->sections)) {
1605 *llvm::find(spill->isd->sections, spill) = isec;
1622 // Remove any spilled input sections to complete their move.
1625 llvm::erase_if(isd->sections, [&](InputSection *isec) {
1635 // Erase any potential spill sections that were not used.
1648 llvm::erase_if(isd->sections, [](InputSection *s) {
1660 // real output sections and cannot be added in the following loop.
1677 // Add output sections to program headers.
1828 // Prevent the symbol from being discarded by --gc-sections.