Lines Matching +defs:buffer +defs:file +defs:name
104 void addLibrary(StringRef name);
215 error("invalid response file quoting: " + s);
225 // Find a file by concatenating given paths.
263 // import file that lists the syscall functions it relies on at runtime.
265 // attribute/flag in the object file itself.
273 // Returns slices of MB by parsing MB as an archive file.
274 // Each slice consists of a member file in the archive.
277 std::unique_ptr<Archive> file =
283 for (const Archive::Child &c : file->children(err)) {
287 ": could not get the buffer for a child of the archive");
295 for (std::unique_ptr<MemoryBuffer> &mb : file->takeThinBuffers())
302 std::optional<MemoryBufferRef> buffer = readFile(path);
303 if (!buffer)
305 MemoryBufferRef mbref = *buffer;
330 std::unique_ptr<Archive> file =
339 "' is neither Wasm object file nor LLVM bitcode");
361 error("unknown file type: " + mbref.getBufferIdentifier());
374 static std::optional<std::string> searchLibraryBaseName(StringRef name) {
377 if (std::optional<std::string> s = findFile(dir, "lib" + name + ".so"))
379 if (std::optional<std::string> s = findFile(dir, "lib" + name + ".a"))
386 static std::optional<std::string> searchLibrary(StringRef name) {
387 if (name.starts_with(":"))
388 return findFromSearchPaths(name.substr(1));
389 return searchLibraryBaseName(name);
393 void LinkerDriver::addLibrary(StringRef name) {
394 if (std::optional<std::string> path = searchLibrary(name))
397 error("unable to find library -l" + name, ErrorTag::LibNotFound, {name});
479 // symbols after the name resolution.
756 // exporting memory under its default name.
778 error("no output file specified");
785 error("entry point specified for relocatable output file");
841 static Symbol *handleUndefined(StringRef name, const char *option) {
842 Symbol *sym = symtab->find(name);
859 static void handleLibcall(StringRef name) {
860 Symbol *sym = symtab->find(name);
875 error("cannot open --why-extract= file " + ctx.arg.whyExtract + ": " +
903 createUndefinedGlobal(StringRef name, llvm::wasm::WasmGlobalType *type) {
905 name, std::nullopt, std::nullopt, WASM_SYMBOL_UNDEFINED, nullptr, type));
911 static InputGlobal *createGlobal(StringRef name, bool isMutable) {
916 wasmGlobal.SymbolName = name;
920 static GlobalSymbol *createGlobalVariable(StringRef name, bool isMutable) {
921 InputGlobal *g = createGlobal(name, isMutable);
922 return symtab->addSyntheticGlobal(name, WASM_SYMBOL_VISIBILITY_HIDDEN, g);
925 static GlobalSymbol *createOptionalGlobal(StringRef name, bool isMutable) {
926 InputGlobal *g = createGlobal(name, isMutable);
927 return symtab->addOptionalGlobalSymbol(name, g);
1019 << "processing stub file: " << stub_file->getName() << "\n");
1020 for (auto [name, deps]: stub_file->symbolDependencies) {
1021 auto* sym = symtab->find(name);
1096 << "processing stub file: " << stub_file->getName() << "\n");
1100 for (auto [name, deps]: stub_file->symbolDependencies) {
1101 auto* sym = symtab->find(name);
1106 message(toString(stub_file) + ": stub symbol not needed: " + name);
1109 << "stub symbol not needed: `" << name << "`\n");
1170 static Symbol *addUndefined(StringRef name) {
1171 return symtab->addUndefinedFunction(name, std::nullopt, std::nullopt,
1186 StringRef name = arg->getValue();
1187 if (!seen.insert(name).second)
1190 Symbol *sym = symtab->find(name);
1194 Symbol *real = addUndefined(saver().save("__real_" + name));
1195 Symbol *wrap = addUndefined(saver().save("__wrap_" + name));
1224 parallelForEach(ctx.objectFiles, [&](InputFile *file) {
1225 MutableArrayRef<Symbol *> syms = file->getMutableSymbols();
1240 parallelForEach(ctx.objectFiles, [](ObjFile *file) {
1241 for (InputChunk *seg : file->segments) {
1245 for (InputChunk *sec : file->customSections) {
1280 (std::string(argsArr[0]) + " [options] file...").c_str(),
1331 // Fail early if the output file or map file is not writable. If a user has a
1335 error("cannot open output file " + ctx.arg.outputFile + ": " + e.message());
1337 error("cannot open map file " + ctx.arg.mapFile + ": " + e.message());
1413 // bitcode file's symbol table. If any of those library functions are defined
1414 // in a bitcode file in an archive member, we need to arrange to use LTO to
1419 // to the link after LTO when we add the LTO object file to the link.
1497 // Write the result to the file.