Lines Matching full:sections

83   // When no SECTIONS is specified, emulate GNU ld's internal linker scripts  in getOutputSectionName()
84 // by grouping sections with certain prefixes. in getOutputSectionName()
86 // GNU ld places text sections with prefix ".text.hot.", ".text.unknown.", in getOutputSectionName()
88 // We provide an option -z keep-text-section-prefix to group such sections in getOutputSectionName()
89 // into separate output sections. This is more flexible. See also in getOutputSectionName()
96 // input sections. For example, with -fsplit-machine-functions, placing the in getOutputSectionName()
313 // adjustOutputSections(). We do not handle such output sections. in processInsertCommands()
354 // Skip such sections for now. Improve the checks if we ever in declareSymbols()
355 // need symbols from that sections to be declared early. in declareSymbols()
424 static bool matchConstraints(ArrayRef<InputSectionBase *> sections, in matchConstraints() argument
430 sections, [](InputSectionBase *sec) { return sec->flags & SHF_WRITE; }); in matchConstraints()
439 // ">" is not a mistake. Sections with larger alignments are placed in sortSections()
440 // before sections with smaller alignments in order to reduce the in sortSections()
466 // Sort sections as instructed by SORT-family commands and --sort-section
490 // Compute and remember which sections the InputSectionDescription matches.
493 ArrayRef<InputSectionBase *> sections, in computeInputSections() argument
502 ret[i] = sections[indexes[i]]; in computeInputSections()
508 // Collects all sections that satisfy constraints of Cmd. in computeInputSections()
513 for (size_t i = 0, e = sections.size(); i != e; ++i) { in computeInputSections()
516 InputSectionBase *sec = sections[i]; in computeInputSections()
523 // We do not ignore SHT_REL[A] linker-synthesized sections here because in computeInputSections()
548 // Skip if the section's first match was /DISCARD/; such sections are in computeInputSections()
569 // Matched sections are ordered by radix sort with the keys being (SORT*, in computeInputSections()
573 // Matched sections between the previous SORT* and this SORT* are sorted by in computeInputSections()
576 // Matched sections by this SORT* pattern are sorted using all 3 keys. in computeInputSections()
584 // Matched sections after the last SORT* are sorted by (--sort-alignment, in computeInputSections()
588 // The flag --enable-non-contiguous-regions may cause sections to match an in computeInputSections()
591 // spill sections. in computeInputSections()
653 // Create output sections described by SECTIONS commands.
670 // sections satisfy a given constraint. If not, a directive is handled in processSectionCommands()
683 // is given, input sections are aligned to that value, whether the in processSectionCommands()
692 // does. Partitions cannot be used with the SECTIONS command, so this is in processSectionCommands()
775 // Sections with SHT_GROUP or SHF_GROUP attributes reach here only when the -r in addInputSec()
786 // relocation sections .rela.foo and .rela.bar for example. Most tools do in addInputSec()
787 // not allow multiple REL[A] sections for output section. Hence we in addInputSec()
788 // should combine these relocation sections into single output. in addInputSec()
789 // We skip synthetic sections because it can be .rela.dyn/.rela.plt or any in addInputSec()
790 // other REL[A] sections created by linker itself. in addInputSec()
807 // In the first phase, input sections that match in name, type and in addInputSec()
808 // attribute flags should be concatenated into single sections. in addInputSec()
813 // ignored. We should not have two output .text sections just because one was in addInputSec()
819 // Merging sections with different flags is expected by some users. One in addInputSec()
834 // expressions like *(.foo*) can refer to multiple input sections with in addInputSec()
835 // different flags. We cannot put them in different output sections or we in addInputSec()
842 // sections such that the .foo sections are the only thing between the start in addInputSec()
845 // Given the above issues, we instead merge sections by name and error on in addInputSec()
853 // Merging two SHF_LINK_ORDER sections with different sh_link fields will in addInputSec()
876 // Add sections that didn't match any sections command.
901 // to create target sections first. We do not want priority handling in addOrphanSections()
902 // for synthetic sections because them are special. in addOrphanSections()
909 // In -r links, SHF_LINK_ORDER sections are added while adding their parent in addOrphanSections()
910 // sections because we need to know the parent's output section before we in addOrphanSections()
928 // If no SECTIONS command was given, we should insert sections commands in addOrphanSections()
931 // When SECTIONS command is present we just add all orphans to the end. in addOrphanSections()
939 llvm::TimeTraceScope timeScope("Diagnose orphan sections"); in diagnoseOrphanHandling()
978 // Non-allocatable sections are not part of the process image. in findMemoryRegion()
1000 // If at least one memory region is defined, all sections must in findMemoryRegion()
1029 // Assign addresses to an output section and offsets to its input sections and
1041 // Non-SHF_ALLOC sections have zero addresses. in assignOffsets()
1044 // Allow consecutive SHF_TLS SHT_NOBITS output sections. The address range in assignOffsets()
1078 // region is the default, and the two sections are in the same memory region, in assignOffsets()
1103 // layout sections. Now, we visit SectionsCommands again to fix in assignOffsets()
1126 auto &sections = cast<InputSectionDescription>(cmd)->sections; in assignOffsets() local
1127 for (InputSection *isec : sections) { in assignOffsets()
1148 // Non-SHF_ALLOC sections do not affect the addresses of other OutputSections in assignOffsets()
1153 // NOBITS TLS sections are similar. Additionally save the end address. in assignOffsets()
1178 // Don't create empty output sections just for unreferenced PROVIDE in isDiscardable()
1193 // headers to sections that are allocated. in maybePropagatePhdrs()
1221 // the previous sections. We copy just SHF_ALLOC and SHF_WRITE to keep the in adjustOutputSections()
1241 // flags to be inherited by subsequent output sections. (sec may contain in adjustOutputSections()
1254 // The code below may remove empty output sections. We should save the in adjustOutputSections()
1256 // sections which do not specify program headers. in adjustOutputSections()
1258 // SECTIONS { .empty : { *(.empty) } :rw in adjustOutputSections()
1260 // Note: at this point the order of output sections has not been finalized, in adjustOutputSections()
1281 // given run some of the output sections in the script will be empty. in adjustOutputSections()
1282 // We could create corresponding empty output sections, but that would in adjustOutputSections()
1284 // We instead remove trivially empty sections. The bfd linker seems even in adjustOutputSections()
1310 // SECTIONS { .aaa : { *(.aaa) } } in adjustSectionsAfterSorting()
1326 // If there is no SECTIONS or if the linkerscript is explicit about program in computeBase()
1334 // When the SECTIONS command is used, try to find an address for the file and
1335 // program headers output sections, which can be added to the first PT_LOAD
1339 // enough space for these sections, we'll remove them from the PT_LOAD segment,
1386 // Here we assign addresses as instructed by linker script SECTIONS
1434 // Spill input sections in reverse order of address assignment to (potentially)
1452 // Input sections that have replaced a potential spill and should be removed in spillSections()
1464 for (InputSection *isec : reverse(isd->sections)) { in spillSections()
1486 *llvm::find(spill->isd->sections, spill) = isec; in spillSections()
1503 // Remove any spilled input sections to complete their move. in spillSections()
1506 llvm::erase_if(isd->sections, [&](InputSection *isec) { in spillSections()
1516 // Erase any potential spill sections that were not used.
1529 llvm::erase_if(isd->sections, [](InputSection *s) { in erasePotentialSpillSections()
1541 // real output sections and cannot be added in the following loop. in createPhdrs()
1557 // Add output sections to program headers. in createPhdrs()
1708 // Prevent the symbol from being discarded by --gc-sections. in addScriptReferencedSymbolsToSymTable()