Lines Matching defs:sec
77 static void printLocation(ELFSyncStream &s, InputSectionBase &sec,
82 s << sec.getSrcMsg(sym, off);
85 s << sec.getObjMsg(off);
307 static void replaceWithDefined(Ctx &ctx, Symbol &sym, SectionBase &sec,
311 size, &sec)
372 BssSection *sec = make<BssSection>(ctx, isRO ? ".bss.rel.ro" : ".bss",
376 // At this point, sectionBases has been migrated to sections. Append sec to
382 isd->sections.push_back(sec);
383 osec->commitSection(sec);
389 replaceWithDefined(ctx, *sym, *sec, 0, sym->size);
391 ctx.mainPart->relaDyn->addSymbolReloc(ctx.target->copyRel, *sec, 0, ss);
409 explicit OffsetGetter(InputSectionBase &sec) {
410 if (auto *eh = dyn_cast<EhInputSection>(&sec)) {
459 InputSectionBase *sec;
489 return sec->getFile<ELFT>()->mipsGp0;
502 const uint8_t *buf = sec->content().data();
725 InputSectionBase &sec = *l.sec;
731 Symbol *enclosing = sec.getEnclosingSymbol(offset);
735 msg << sec.getSrcMsg(enclosing ? *enclosing : sym, offset);
738 msg << sec.getObjMsg(offset);
793 InputSectionBase &sec, uint64_t offset) {
798 ctx.undefErrs.push_back({&sym, {{&sec, offset}}, false});
817 if (sym.discardedSecIdx != 0 && (sec.name == ".got2" || sec.name == ".toc"))
823 ctx.undefErrs.push_back({&sym, {{&sec, offset}}, isWarning});
1034 printLocation(diag, *sec, sym, relOff);
1071 sec->content().data() + offset);
1084 ctx.mainPart->relaDyn->addSymbolReloc(type, *sec, offset, sym, addend,
1098 ctx.in.mipsGot->addEntry(*sec->file, sym, addend, expr);
1130 sec->addReloc({expr, type, offset, addend, &sym});
1140 bool canWrite = (sec->flags & SHF_WRITE) ||
1142 (isa<EhInputSection>(sec) && ctx.arg.emachine != EM_MIPS));
1147 addRelativeReloc<true>(ctx, *sec, offset, sym, addend, expr, type);
1154 Partition &part = sec->getPartition(ctx);
1160 part.relaDyn->addSymbolReloc(type, *sec, offset, sym, addend, type);
1161 } else if (part.relrAuthDyn && sec->addralign >= 2 && offset % 2 == 0) {
1165 sec->addReloc({expr, type, offset, addend, &sym});
1166 part.relrAuthDyn->relocs.push_back({sec, sec->relocs().size() - 1});
1168 part.relaDyn->addReloc({R_AARCH64_AUTH_RELATIVE, sec, offset,
1174 part.relaDyn->addSymbolReloc(rel, *sec, offset, sym, addend, type);
1192 ctx.in.mipsGot->addEntry(*sec->file, sym, addend, expr);
1206 printLocation(diag, *sec, sym, offset);
1217 printLocation(diag, *sec, sym, offset);
1221 sec->addReloc({expr, type, offset, addend, &sym});
1257 printLocation(diag, *sec, sym, offset);
1260 sec->addReloc({expr, type, offset, addend, &sym});
1272 printLocation(diag, *sec, sym, offset);
1297 static unsigned handleAArch64PAuthTlsRelocation(InputSectionBase *sec,
1306 sec->addReloc({expr, type, offset, addend, &sym});
1332 sec, expr, type, offset, sym, addend))
1340 printLocation(diag, *sec, sym, offset);
1347 return handleMipsTlsRelocation(ctx, type, sym, *sec, offset, addend, expr);
1356 sec->addReloc({expr, type, offset, addend, &sym});
1373 sec->addReloc({expr, type, offset, addend, &sym});
1387 !sec->file->ppc64DisableTLSRelax;
1406 sec->addReloc({ctx.target->adjustTlsExpr(type, R_RELAX_TLS_LD_TO_LE),
1413 sec->addReloc({expr, type, offset, addend, &sym});
1421 sec->addReloc({expr, type, offset, addend, &sym});
1430 sec->addReloc({expr, type, offset, addend, &sym});
1439 sec->addReloc({expr, type, offset, addend, &sym});
1451 sec->addReloc({ctx.target->adjustTlsExpr(type, R_RELAX_TLS_GD_TO_IE),
1454 sec->addReloc({ctx.target->adjustTlsExpr(type, R_RELAX_TLS_GD_TO_LE),
1466 sec->addReloc({R_RELAX_TLS_IE_TO_LE, type, offset, addend, &sym});
1472 addRelativeReloc<true>(ctx, *sec, offset, sym, addend, expr, type);
1474 sec->addReloc({expr, type, offset, addend, &sym});
1486 Symbol &sym = sec->getFile<ELFT>()->getSymbol(symIndex);
1506 ctx.target->getRelExpr(type, sym, sec->content().data() + offset);
1510 sec->content().data() + rel.r_offset, type);
1523 maybeReportUndefined(ctx, cast<Undefined>(sym), *sec, offset))
1536 sec->file->ppc64SmallCodeModelTocRelocs = true;
1552 printLocation(diag, *sec, sym, offset);
1598 static void checkPPC64TLSRelax(InputSectionBase &sec, Relocs<RelTy> rels) {
1599 // Skip if sec is synthetic (sec.file is null) or if sec has been marked.
1600 if (!sec.file || sec.file->ppc64DisableTLSRelax)
1622 sec.file->ppc64DisableTLSRelax = true;
1623 Warn(sec.file->ctx)
1624 << sec.file
1634 sec->relocations.reserve(rels.size());
1637 checkPPC64TLSRelax<RelTy>(*sec, rels);
1645 if (isa<EhInputSection>(sec) || ctx.arg.emachine == EM_S390)
1661 (ctx.arg.emachine == EM_PPC64 && sec->name == ".toc"))
1662 llvm::stable_sort(sec->relocs(),
1670 sec = &s;
1712 for (EhInputSection *sec : part.ehFrame->sections)
1713 scanner.template scanSection<ELFT>(*sec, /*isEH=*/true);
1715 for (InputSection *sec : part.armExidx->exidxSections)
1716 if (sec->isLive())
1717 scanner.template scanSection<ELFT>(*sec);
2527 OutputSection *osec, InputSection *sec, Rels rels) {
2529 Symbol &sym = sec->file->getSymbol(r.getSymbol(ctx.arg.isMips64EL));
2542 Err(ctx) << sec->getLocation(r.r_offset)
2560 parallelForEach(isd->sections, [&](InputSection *sec) {
2561 invokeOnRelocs(*sec, scanCrossRefs<ELFT>, ctx, noxref, osec, sec);