Lines Matching +defs:load +defs:file

47 // The writer writes a SymbolTable result to a file.
210 ErrAlways(ctx) << s->file << " cannot redefine linker defined symbol '"
225 // __ehdr_start is the location of ELF file headers. Note that we define
263 for (auto [i, sec] : llvm::enumerate(sym.file->getSections()))
268 Undefined(sym.file, sym.getName(), binding, sym.stOther, sym.type,
290 demoteDefined(*d, sectionIndexMap[d->file]);
293 if (sym->isLazy() || (s && !cast<SharedFile>(s->file)->isNeeded)) {
351 // fails, for example, due to an erroneous file size.
361 // It does not make sense try to open the file if we have error already.
366 llvm::TimeTraceScope timeScope("Write output file");
367 // Write the result down to a file.
382 // because the content is usually a hash value of the entire output file.
399 static void markUsedLocalSymbolsImpl(ObjFile<ELFT> *file,
402 Symbol &sym = file->getRelocTargetSym(rel);
415 for (ELFFileBase *file : ctx.objectFiles) {
416 ObjFile<ELFT> *f = cast<ObjFile<ELFT>>(file);
429 Symbol &sym = file->getSymbol(r.r_symidx);
495 for (ELFFileBase *file : ctx.objectFiles) {
497 for (Symbol *b : file->getLocalSymbols()) {
550 ctx.in.symTab->addSymbol(makeDefined(ctx, isec->file, "", STB_LOCAL,
644 // section should be placed in the file. Instead of using simple
683 // program headers at the start of the file.
711 // included in a truncate core file. In particular, .note.gnu.build-id, if
712 // available, can identify the object file.
960 // Place non-alloc orphan sections at the end. This matches how we assign file
1029 // specifies the start of the file, but doesn't care about the end (the non
1079 // If both --symbol-ordering-file and call graph profile are present, the order
1080 // file takes precedence, but the call graph profile is still used for symbols
1081 // that don't appear in the order file.
1096 // appear in the symbol ordering file have the lowest priority 0.
1126 for (ELFFileBase *file : ctx.objectFiles)
1127 for (Symbol *sym : file->getLocalSymbols())
1133 Warn(ctx) << "symbol ordering file: no such symbol: "
1224 // --symbol-ordering-file or --shuffle-sections=. This is a least significant
1249 return a->file->ppc64SmallCodeModelTocRelocs &&
1250 !b->file->ppc64SmallCodeModelTocRelocs;
1305 // not explicitly placed into the output file by the linker script.
1357 // section. We do this because it is common to set a load address by starting
1692 numDeleted += ctx.target->deleteFallThruJmpInsn(sec, sec.file, next);
1895 for (SharedFile *file : ctx.sharedFiles) {
1897 llvm::all_of(file->dtNeeded, [&](StringRef needed) {
1902 for (Symbol *sym : file->requiredSymbols) {
1908 << file << " (disallowed by --no-allow-shlib-undefined)";
1912 << "non-exported symbol '" << sym << "' in '" << sym->file
1913 << "' is referenced by DSO '" << file << "'";
1936 if (auto *file = dyn_cast<SharedFile>(sym->file))
1937 if (file->isNeeded && !sym->isUndefined())
2118 // All information needed for OutputSection part of Map file is available.
2256 PhdrEntry *load = nullptr;
2276 load = addHdr(PT_LOAD, flags);
2277 load->add(ctx.out.elfHeader.get());
2278 load->add(ctx.out.programHeaders.get());
2328 // As an exception, we don't create a separate load segment for the ELF
2335 // supposed-to-be-NOBITS section to the output file. (However, we cannot do
2344 load = nullptr;
2347 load && !sec->lmaExpr && sec->lmaRegion == load->firstSec->lmaRegion;
2348 if (load && sec != relroEnd &&
2349 sec->memRegion == load->firstSec->memRegion &&
2350 (sameLMARegion || load->lastSec == ctx.out.programHeaders.get()) &&
2352 load->lastSec->type != SHT_NOBITS)) {
2353 load->p_flags |= newFlags;
2355 load = addHdr(PT_LOAD, newFlags);
2359 load->add(sec);
2470 // padding in the file contents.
2478 // sections will be extracted to a separate file. Align to the next
2526 // Compute an in-file position for a given section. The file offset must be the
2528 // load executables without any address adjustment.
2545 // If two sections share the same PT_LOAD the file offset is calculated
2576 // Assign file offsets to output sections.
2588 // will not occupy file offsets contained by a PT_LOAD.
2599 // following section to avoid loading non-segments parts of the file.
2616 // With use of linker scripts it is possible to violate this rule and get file
2623 // we want to prevent file size overflows because it would crash the linker.
2629 << " at file offset "
2636 // file offsets and VAs to all sections.
2687 // Check whether sections overlap for a specific address range (file offsets,
2688 // load and virtual addresses).
2720 // file offsets. For SHF_ALLOC sections we also check that the load address
2732 // Check for overlapping file offsets. In this case we need to skip any
2734 // the file so Sec->Offset + Sec->Size can overlap with others. If --oformat
2736 // file so we skip any non-allocated sections in that case.
2742 checkOverlap(ctx, "file", fileOffs, false);
2744 // When linking with -r there is no need to check for overlapping virtual/load
2750 // Checking for overlapping virtual and load addresses only needs to take
2754 // ranges in the file.
2761 // Finally, check that the load addresses don't overlap. This will usually be
2768 checkOverlap(ctx, "load address", lmas, false);
2844 // Open a result file.
2850 s << "output file too large: " << fileSize << " bytes\n"
2906 // Round up the file size of the last segment to the page boundary iff it is
2908 // trim the instruction padding (e.g. when stripping the file).
2920 // Write section contents to a mmap'ed file.
2979 // Compute a hash of all sections of the output file.