Lines Matching +defs:symbol +defs:function

43     // parse the shared library symbol table.
74 // This function is where all the optimizations of link-time
77 // This function compiles bitcode files into a few big native files
147 error("symbol type mismatch: " + toString(*existing) + "\n>>> defined as " +
153 // Check the type of new symbol matches that of the symbol is replacing.
154 // Returns true if the function types match, false is there is a signature
160 // If either function is missing a signature (this happens for bitcode
223 InputFunction *function) {
226 ctx.syntheticFunctions.emplace_back(function);
228 flags, nullptr, function);
231 // Adds an optional, linker generated, data symbol. The symbol will only be
233 // exported via the --export flag. Otherwise we don't add the symbol and return
294 // If existing symbol is undefined, replace it.
296 LLVM_DEBUG(dbgs() << "resolving existing undefined symbol: "
303 LLVM_DEBUG(dbgs() << "existing symbol takes precedence\n");
307 // If the existing symbol is weak, we should replace it.
309 LLVM_DEBUG(dbgs() << "replacing existing weak symbol\n");
315 LLVM_DEBUG(dbgs() << "replacing existing shared symbol\n");
319 // Neither symbol is week. They conflict.
323 errorOrWarn("duplicate symbol: " + toString(*existing) + "\n>>> defined in " +
335 ("function signature mismatch: " + symName + "\n>>> defined as " +
382 LLVM_DEBUG(dbgs() << "resolving existing undefined symbol: " << s->getName()
393 // With --no-shlib-sigcheck we ignore the signature of the function as
428 InputFunction *function) {
430 << (function ? toString(function->signature) : "none")
437 // If the new defined function doesn't have signature (i.e. bitcode
438 // functions) but the old symbol does, then preserve the old signature
440 auto* newSym = replaceSymbol<DefinedFunction>(sym, name, flags, file, function);
460 if (checkSig && function && !signatureMatches(existingFunction, &function->signature)) {
462 if (getFunctionVariant(s, &function->signature, file, &variant))
469 // This variant we found take the place in the symbol table as the primary
475 // Existing function with matching signature.
579 // This function get called when an undefined symbol is added, and there is
581 // custom 'import-module' and 'import-field' symbol attributes agree.
594 error("import name mismatch for symbol: " + toString(*existing) +
604 error("import module mismatch for symbol: " + toString(*existing) +
610 // Update symbol binding, if the existing symbol is weak
662 // Special handling for when the existing function is a shared symbol
670 // this one take precedence. Otherwise the existing function is either
671 // directly called or defined, in which case we need a function variant.
821 // Whether or not we need an indirect function table is usually a function of
823 // no input to need the indirect function table, but then a late
824 // addInternalGOTEntry causes a function to be allocated an address. In that
830 error(Twine("reserved symbol must be of type table: `") +
835 error(Twine("reserved symbol must not be defined in input files: `") +
852 // table or because the table symbol is already live. The existing table is
857 // An indirect function table will only be present in the symbol table if
877 // The existing symbol is undefined, load a new one from the archive,
878 // unless the existing symbol is weak in which case replace the undefined
886 LLVM_DEBUG(dbgs() << "replacing existing weak undefined symbol\n");
904 // The new signature doesn't match. Create a variant to the symbol with the
913 // Linear search through symbol variants. Should never be more than two
946 // Set a flag for --trace-symbol so that we can print out a log message
947 // if a new symbol with the same name is inserted into the symbol table.
961 // Anyone looking up the original should get the __wrap symbol
970 // Replace the given symbol body with an unreachable function.
972 // equivalent of an undefined function and also handleSymbolVariants for
984 // Ensure the stub function doesn't get a table entry. Its address
1000 // the symbol. In this case, we need to synthesise a dummy/stub function that
1036 // Remove any variant symbols that were created due to function signature
1040 // Push the initial symbol onto the list of variants.
1045 LLVM_DEBUG(dbgs() << "symbol with (" << variants.size()
1056 for (auto *symbol : variants) {
1057 if (auto f = dyn_cast<DefinedFunction>(symbol)) {
1073 for (auto *symbol : variants) {
1074 if (symbol != defined) {
1075 auto *f = cast<FunctionSymbol>(symbol);