| /llvm-project-15.0.7/lld/ELF/ |
| H A D | MarkLive.cpp | 125 enqueue(sec, 0); in resolveReloc() 170 switch (sec->type) { in isReserved() 206 if (sec->partition == 1 || sec->partition == partition) in enqueue() 208 sec->partition = sec->partition ? 1 : partition; in enqueue() 264 enqueue(sec, 0); in run() 293 bool isRel = sec->type == SHT_REL || sec->type == SHT_RELA; in run() 303 if (isReserved(sec) || script->shouldKeep(sec)) { in run() 304 enqueue(sec, 0); in run() 311 cNamedSections[saver().save("__stop_" + sec->name)].push_back(sec); in run() 356 if (!sec->isLive() || !isValidCIdentifier(sec->name)) in moveToMain() [all …]
|
| H A D | LinkerScript.cpp | 114 if (sec) in getValue() 121 return sec ? sec->getOutputSection()->addr + sec->getOffset(0) : 0; in getSecAddr() 136 OutputDesc *sec; in createOutputSection() local 139 sec = secRef; in createOutputSection() 143 secRef = sec; in createOutputSection() 146 return sec; in createOutputSection() 220 SectionBase *sec = value.isAbsolute() ? nullptr : value.sec; in addSymbol() local 512 if (!sec->isLive() || sec->parent || seen.contains(i)) in computeInputSections() 945 return sec; in findFirstSection() 973 setDot(sec->addrExpr, sec->location, false); in assignOffsets() [all …]
|
| H A D | DWARF.cpp | 33 InputSectionBase *sec = it.value(); in LLDDwarfObj() local 34 if (!sec) in LLDDwarfObj() 48 m->Data = toStringRef(sec->data()); in LLDDwarfObj() 49 m->sec = sec; in LLDDwarfObj() 53 if (sec->name == ".debug_abbrev") in LLDDwarfObj() 55 else if (sec->name == ".debug_str") in LLDDwarfObj() 59 else if (sec->name == ".debug_info" && in LLDDwarfObj() 71 infoSection.sec = sec; in LLDDwarfObj() 139 const RelsOrRelas<ELFT> rels = sec.sec->template relsOrRelas<ELFT>(); in find() 141 return findAux(*sec.sec, pos, rels.rels); in find() [all …]
|
| H A D | Writer.cpp | 1621 if (sec && sec->isNeeded() && sec->getParent()) { in finalizeSynthetic() 1828 if (sec->getParent() && sec->isNeeded()) in removeUnusedSyntheticSections() 1940 if (sec->isLive() && isa<InputSection>(sec) && (sec->flags & SHF_ALLOC)) in finalizeSections() 2559 return sec.type != SHT_NOBITS && (sec.flags & SHF_ALLOC) && sec.size > 0; in assignFileOffsetsBinary() 2564 sec->offset = sec->getLMA(); in assignFileOffsetsBinary() 2630 if ((sec->offset > fileSize) || (sec->offset + sec->size > fileSize)) in assignFileOffsets() 2734 fileOffs.push_back({sec, sec->offset}); in checkSections() 2750 if (sec->size > 0 && (sec->flags & SHF_ALLOC) && !(sec->flags & SHF_TLS)) in checkSections() 2751 vmas.push_back({sec, sec->addr}); in checkSections() 2759 if (sec->size > 0 && (sec->flags & SHF_ALLOC) && !(sec->flags & SHF_TLS)) in checkSections() [all …]
|
| H A D | InputFiles.cpp | 325 return &sec; in findSection() 417 if (sec.sh_size == 0) in shouldMerge() 574 i, sec, check(obj.getSectionName(sec, shstrtab))); in initializeSections() 618 if (sec.sh_type == SHT_REL || sec.sh_type == SHT_RELA) { in initializeSections() 652 *this, sec, check(obj.getSectionName(sec, shstrtab))); in initializeSections() 663 if (!sec.sh_link || !(sec.sh_flags & SHF_LINK_ORDER)) in initializeSections() 791 fatal(toString(sec.file) + ":(" + sec.name + "+0x" + in readAndFeatures() 998 if ((sec.sh_flags & SHF_MERGE) && shouldMerge(sec, name)) in createInputSection() 1241 if (!sec) in parseVerdefs() 1266 if (!sec) in parseVerneed() [all …]
|
| H A D | Relocations.cpp | 363 BssSection *sec = in addCopyRelSymbol() local 373 isd->sections.push_back(sec); in addCopyRelSymbol() 374 osec->commitSection(sec); in addCopyRelSymbol() 435 : sec(sec), getter(sec), config(elf::config.get()), target(*elf::target) { in RelocationScanner() 440 InputSectionBase &sec; member in __anon04691b640111::RelocationScanner 568 InputSectionBase *sec; member 752 InputSectionBase &sec = *l.sec; in reportUndefinedSymbol() local 840 if (sym.discardedSecIdx != 0 && (sec.name == ".got2" || sec.name == ".toc")) in maybeReportUndefined() 1057 sec.getPartition().relaDyn->addSymbolReloc(rel, sec, offset, sym, addend, in processAux() 1454 if (!sec.file || sec.file->ppc64DisableTLSRelax) in checkPPC64TLSRelax() [all …]
|
| H A D | SyntheticSections.cpp | 89 sec->splitIntoPieces(); in createCommentSection() 90 return sec; in createCommentSection() 113 sec->markDead(); in create() 186 sec->markDead(); in create() 243 sec->markDead(); in create() 379 auto *sec = cast<EhInputSection>(fde.sec); in isFdeLive() local 435 if (!sec->isLive()) in addSectionAux() 445 sec->parent = this; in addSection() 3290 sec->pieces[i].outputOff = builder.getOffset(sec->getData(i)); in finalizeContents() 3326 sec->pieces[i].outputOff = shards[shardId].add(sec->getData(i)); in finalizeContents() [all …]
|
| H A D | LinkerScript.h | 39 ExprValue(SectionBase *sec, bool forceAbsolute, uint64_t val, in ExprValue() 41 : sec(sec), val(val), forceAbsolute(forceAbsolute), loc(loc.str()) {} in ExprValue() 45 bool isAbsolute() const { return forceAbsolute || sec == nullptr; } in isAbsolute() 51 SectionBase *sec; member 287 SmallVector<size_t, 0> getPhdrIndices(OutputSection *sec); 290 findMemoryRegion(OutputSection *sec, MemoryRegion *hint); 292 void assignOffsets(OutputSection *sec); 331 bool isDiscarded(const OutputSection *sec) const;
|
| H A D | InputSection.cpp | 41 return (toString(sec->file) + ":(" + sec->name + ")").str(); in toString() 185 InputSection *sec; in getOutputSection() local 187 sec = isec; in getOutputSection() 189 sec = ms->getParent(); in getOutputSection() 191 sec = eh->getParent(); in getOutputSection() 194 return sec ? sec->getParent() : nullptr; in getOutputSection() 380 if (!isDebugSection(*sec) && sec->name != ".eh_frame" && in copyRelocations() 381 sec->name != ".gcc_except_table" && sec->name != ".got2" && in copyRelocations() 382 sec->name != ".toc") { in copyRelocations() 959 auto *sec = cast<InputSection>(this); in relocate() local [all …]
|
| H A D | DWARF.h | 23 InputSectionBase *sec = nullptr; member 36 return cast<InputSection>(infoSection.sec); in getInfoSection() 80 llvm::Optional<llvm::RelocAddrEntry> find(const llvm::DWARFSection &sec, 85 llvm::Optional<llvm::RelocAddrEntry> findAux(const InputSectionBase &sec,
|
| /llvm-project-15.0.7/lld/ELF/Arch/ |
| H A D | RISCV.cpp | 511 if (sec->relocations.size()) { in initSymbolAnchors() 512 sec->relaxAux->relocDeltas = in initSymbolAnchors() 514 sec->relaxAux->relocTypes = in initSymbolAnchors() 527 if (sec->flags & SHF_EXECINSTR && sec->relaxAux) { in initSymbolAnchors() 605 static bool relax(InputSection &sec) { in relax() argument 606 const uint64_t secAddr = sec.getVA(); in relax() 607 auto &aux = *sec.relaxAux; in relax() 685 sec.bytesDropped = delta; in relax() 710 changed |= relax(*sec); in relaxOnce() 727 auto &rels = sec->relocations; in riscvFinalizeRelax() [all …]
|
| /llvm-project-15.0.7/openmp/runtime/tools/lib/ |
| H A D | Build.pm | 40 my ( $sec, $min, $hour, $day, $month, $year ) = gmtime( $time ); 43 … my $str = sprintf( "%04d-%02d-%02d %02d:%02d:%02d UTC", $year, $month, $day, $hour, $min, $sec ); 50 my ( $sec ) = @_; 52 $h = int( $sec / 3600 ); 53 $sec = $sec - $h * 3600; 54 $m = int( $sec / 60 ); 55 $sec = $sec - $m * 60; 56 $s = int( $sec ); 57 $sec = $sec - $s;
|
| /llvm-project-15.0.7/llvm/test/tools/llvm-objcopy/COFF/ |
| H A D | remove-section.test | 33 # SYMBOLS-PRE-NEXT: {{.*}}(sec -1){{.*}} @feat.00 34 # SYMBOLS-PRE-NEXT: {{.*}}(sec 1){{.*}} .text 36 # SYMBOLS-PRE-NEXT: {{.*}}(sec 2){{.*}} .bss 38 # SYMBOLS-PRE-NEXT: {{.*}}(sec 4){{.*}} .associative 40 # SYMBOLS-PRE-NEXT: {{.*}}(sec 3){{.*}} .comdat 42 # SYMBOLS-PRE-NEXT: {{.*}}(sec 3){{.*}} foo 43 # SYMBOLS-PRE-NEXT: {{.*}}(sec 1){{.*}} main 63 # SYMBOLS-REMOVE-BSS-NEXT: {{.*}}(sec 1){{.*}} .text 69 # SYMBOLS-REMOVE-BSS-NEXT: {{.*}}(sec 2){{.*}} foo 70 # SYMBOLS-REMOVE-BSS-NEXT: {{.*}}(sec 1){{.*}} main [all …]
|
| /llvm-project-15.0.7/llvm/test/tools/llvm-objdump/COFF/ |
| H A D | import-library.test | 3 CHECK: [ 0](sec 0)(fl 0x00)(ty 0)(scl 0) (nx 0) 0x00000000 __imp__constant 5 CHECK: [ 0](sec 0)(fl 0x00)(ty 0)(scl 0) (nx 0) 0x00000000 __imp__data 7 CHECK: [ 0](sec 0)(fl 0x00)(ty 0)(scl 0) (nx 0) 0x00000000 __imp__function 8 CHECK: [ 1](sec 0)(fl 0x00)(ty 20)(scl 0) (nx 0) 0x00000000 _function 10 CHECK: [ 0](sec 0)(fl 0x00)(ty 0)(scl 0) (nx 0) 0x00000000 __imp__ordinal 11 CHECK: [ 1](sec 0)(fl 0x00)(ty 20)(scl 0) (nx 0) 0x00000000 _ordinal
|
| /llvm-project-15.0.7/lld/test/ELF/ |
| H A D | input-section-flags.s | 8 ## Uniquely identify each .sec section by flag alone, with .text going into 81 # MULTIPLE: Section: .sec.aw 83 # MULTIPLE: Section: .sec.aM 85 # MULTIPLE: Section: .sec.aMS 92 .section .sec.a, "a", @progbits 97 .section .sec.ax, "ax", @progbits 102 .section .sec.aw, "aw", @progbits 107 .section .sec.aM, "aM", @progbits, 4 112 .section .sec.aMS, "aMS", @progbits, 1
|
| /llvm-project-15.0.7/llvm/test/tools/llvm-objcopy/wasm/ |
| H A D | dump-section.test | 3 # RUN: llvm-objcopy --dump-section=producers=%t.sec %t 4 # RUN: od -t x1 %t.sec | FileCheck %s 6 # RUN: not llvm-objcopy --dump-section=nonexistent=%t.sec %t 2>&1 | FileCheck --check-prefix=NONEXI… 17 # RUN: llvm-objcopy --dump-section=TYPE=%t.sec %t 18 # RUN: od -t x1 %t.sec | FileCheck %s --check-prefix=TYPESEC 25 # RUN: llvm-objcopy --dump-section=producers=%t.sec --remove-section=producers %t %t2 26 # RUN: od -t x1 %t.sec | FileCheck %s
|
| /llvm-project-15.0.7/lld/COFF/ |
| H A D | Writer.cpp | 546 sec->origChunks = sec->chunks; in finalizeAddresses() 579 sec->chunks = sec->origChunks; in finalizeAddresses() 668 if (sec->sym) in sortBySectionOrder() 838 if (!sec) { in createSections() 842 return sec; in createSections() 919 sec->addChunk(c); in createSections() 1210 sec->setStringTableOff(addEntryToStringTable(sec->name)); in createSymbolAndStringTable() 1290 if (sec == relocSec) in assignAddresses() 2010 if (sec->name == name) in findSection() 2011 return sec; in findSection() [all …]
|
| H A D | MapFile.cpp | 47 static void writeHeader(raw_ostream &os, uint32_t sec, uint64_t addr) { in writeHeader() argument 48 os << format(" %04x:%08llx", sec, addr); in writeHeader() 161 if (OutputSection *sec = ctx.getOutputSection(chunk)) in getSymbolStrings() local 162 address -= sec->header.VirtualAddress; in getSymbolStrings() 249 for (OutputSection *sec : ctx.outputSections) { in writeMapFile() 252 for (Chunk *c : sec->chunks) { in writeMapFile() 266 (sec->header.Characteristics & COFF::IMAGE_SCN_CNT_CODE) && in writeMapFile() 267 (sec->header.Characteristics & COFF::IMAGE_SCN_MEM_READ) && in writeMapFile() 268 (sec->header.Characteristics & COFF::IMAGE_SCN_MEM_EXECUTE); in writeMapFile() 275 auto address = cr.first->getRVA() - sec->header.VirtualAddress; in writeMapFile() [all …]
|
| H A D | LLDMapFile.cpp | 108 for (OutputSection *sec : ctx.outputSections) { in writeLLDMapFile() 109 writeHeader(os, sec->getRVA(), sec->getVirtualSize(), /*align=*/pageSize); in writeLLDMapFile() 110 os << sec->name << '\n'; in writeLLDMapFile() 112 for (Chunk *c : sec->chunks) { in writeLLDMapFile()
|
| /llvm-project-15.0.7/lldb/test/API/python_api/module_section/ |
| H A D | TestModuleAndSection.py | 45 for sec in exe_module.section_iter(): 46 print(sec) 50 sec.GetNumSubSections()) 51 if sec.GetNumSubSections() == 0: 52 for sym in exe_module.symbol_in_section_iter(sec): 60 for subsec in sec:
|
| /llvm-project-15.0.7/lld/wasm/ |
| H A D | OutputSections.h | 61 static bool classof(const OutputSection *sec) { in classof() argument 62 return sec->type == llvm::wasm::WASM_SEC_CODE; in classof() 84 static bool classof(const OutputSection *sec) { in classof() argument 85 return sec->type == llvm::wasm::WASM_SEC_DATA; in classof() 115 static bool classof(const OutputSection *sec) { in classof() argument 116 return sec->type == llvm::wasm::WASM_SEC_CUSTOM; in classof()
|
| /llvm-project-15.0.7/llvm/test/MC/CSKY/ |
| H A D | bsr.s | 5 sec: label 13 bsr sec 14 bsr sec - 4 15 bsr sec + 4
|
| /llvm-project-15.0.7/llvm/test/tools/llvm-readobj/ELF/ |
| H A D | hex-dump.test | 46 # RUN: llvm-readelf --hex-dump=.sec %t2.out1 | \ 49 # SPACES1:Hex dump of section '.sec': 55 # RUN: llvm-readelf --hex-dump=.sec %t2.out2 | \ 58 # SPACES2:Hex dump of section '.sec': 64 # RUN: llvm-readelf --hex-dump=.sec %t2.out3 | \ 67 # SPACES3:Hex dump of section '.sec': 77 - Name: .sec
|
| /llvm-project-15.0.7/lld/MachO/ |
| H A D | InputFiles.cpp | 101 return (toString(sec.file) + ":(" + sec.name + ")").str(); in toString() 307 StringRef(sec.sectname, strnlen(sec.sectname, sizeof(sec.sectname))); in parseSections() 309 StringRef(sec.segname, strnlen(sec.segname, sizeof(sec.segname))); in parseSections() 310 sections.push_back(make<Section>(this, segname, name, sec.flags, sec.addr)); in parseSections() 311 if (sec.align >= 32) { in parseSections() 317 uint32_t align = 1 << sec.align; in parseSections() 339 sec.sectname + in parseSections() 421 [](uint64_t value, const Section *sec) { return value < sec->addr; })); in findContainingSection() argument 646 reinterpret_cast<const relocation_info *>(buf + sec.reloff), sec.nreloc); in parseRelocations() 1123 for (Section *sec : sections) { in parse() [all …]
|
| /llvm-project-15.0.7/llvm/test/MC/AVR/ |
| H A D | inst-family-set-clr-flag.s | 10 sec label 74 ; CHECK: sec ; encoding: [0x08,0x94] 75 ; CHECK: sec ; encoding: [0x08,0x94] 108 ; CHECK-INST: sec 109 ; CHECK-INST: sec
|