Lines Matching +defs:run +defs:s

54   void run();
98 Writer<ELFT>(ctx).run();
127 for (InputSectionBase *s : ctx.inputSections) {
128 if (!(s->flags & SHF_ALLOC) || !s->isLive() || s->type != SHT_NOTE)
130 auto *copy = make<InputSection>(cast<InputSection>(*s));
148 Symbol *s = ctx.symtab->find(name);
149 if (!s || s->isDefined() || s->isCommon())
152 ctx.synthesizedSymbols.push_back(s);
153 s->resolve(ctx, Defined{ctx, ctx.internalFile, StringRef(), STB_GLOBAL,
156 s->isUsedInRegularObj = true;
157 return cast<Defined>(s);
208 if (Symbol *s = ctx.symtab->find(gotSymName)) {
209 if (s->isDefined()) {
210 ErrAlways(ctx) << s->file << " cannot redefine linker defined symbol '"
219 s->resolve(ctx, Defined{ctx, ctx.internalFile, StringRef(), STB_GLOBAL,
222 ctx.sym.globalOffsetTable = cast<Defined>(s);
247 auto add = [&](StringRef s, int64_t pos) {
248 return addOptionalRegular(ctx, s, ctx.out.elfHeader.get(), pos,
292 auto *s = dyn_cast<SharedSymbol>(sym);
293 if (sym->isLazy() || (s && !cast<SharedFile>(s->file)->isNeeded)) {
319 template <class ELFT> void Writer<ELFT>::run() {
417 for (InputSectionBase *s : f->getSections()) {
418 InputSection *isec = dyn_cast_or_null<InputSection>(s);
481 if (auto *s = dyn_cast<MergeInputSection>(sec))
482 return s->getSectionPiece(d->value).live;
529 for (InputSectionBase *s : isd->sections) {
531 if (isStaticRelSecType(s->type))
537 if (isa<SyntheticSection>(s) && !(s->flags & SHF_MERGE))
540 isec = s;
556 // Today's loaders have a feature to make segments read-only after
621 // there's no need to write to it at runtime, so it's better to put
630 StringRef s = sec->name;
632 bool abiAgnostic = s == ".data.rel.ro" || s == ".bss.rel.ro" ||
633 s == ".ctors" || s == ".dtors" || s == ".jcr" ||
634 s == ".eh_frame" || s == ".fini_array" ||
635 s == ".init_array" || s == ".preinit_array";
638 ctx.arg.osabi == ELFOSABI_OPENBSD && s == ".openbsd.randomdata";
909 // be equal to the _gp symbol's value.
983 // depending on whether the orphan's rank is smaller.
1003 // point. If i's rank is larger, the orphan section can be placed before i.
1028 // This matches bfd's behavior and is convenient when the linker script fully
1100 for (StringRef s : ctx.arg.symbolOrderingFile)
1101 symbolOrder.insert({CachedHashStringRef(s), {priority++, false}});
1337 // expressions. There's no correct answer here due to the lack of the
1450 StringRef s = sec->name;
1451 return s == ".bss" || s == ".data" || s == ".data.rel.ro" || s == ".lbss" ||
1452 s == ".ldata" || s == ".lrodata" || s == ".ltext" || s == ".rodata" ||
1453 s.starts_with(".text");
1714 // don't need a .got (for example) at all because there's no
1725 llvm::find_if(llvm::reverse(ctx.inputSections), [](InputSectionBase *s) {
1726 return !isa<SyntheticSection>(s);
1732 std::remove_if(start, ctx.inputSections.end(), [&](InputSectionBase *s) {
1733 auto *sec = cast<SyntheticSection>(s);
1782 Symbol *s = ctx.symtab->addSymbol(Defined{
1785 s->isUsedInRegularObj = true;
1791 // RISC-V's gp can address +/- 2 KiB, set it to .sdata + 0x800. This symbol
1804 Symbol *s = ctx.symtab->find("__global_pointer$");
1805 if (s && s->isDefined())
1806 ctx.sym.riscvGlobalPointer = cast<Defined>(s);
1823 Symbol *s = ctx.symtab->find("_TLS_MODULE_BASE_");
1824 if (s && s->isUndefined()) {
1825 s->resolve(ctx, Defined{ctx, ctx.internalFile, StringRef(), STB_GLOBAL,
1828 ctx.sym.tlsModuleBase = cast<Defined>(s);
1943 // partitions and add any referenced symbols to the partition's dynsym.
2099 // JAL instruction can target only +-1 MiB from PC. It is a linker's
2207 StringRef s = osec.name;
2208 if (!isValidCIdentifier(s))
2211 Defined *startSym = addOptionalRegular(ctx, ss.save("__start_" + s), &osec, 0,
2213 Defined *stopSym = addOptionalRegular(ctx, ss.save("__stop_" + s), &osec, -1,
2332 // segment (since it's represented as p_filesz < p_memsz). If we have a
2403 // stack, you can pass -z execstack, but that's not recommended for
2723 // First, check that section's VAs fit in available address space for target.
2849 raw_string_ostream s(msg);
2850 s << "output file too large: " << fileSize << " bytes\n"
2853 s << os->name << ' ' << os->size << "\n";