X-Git-Url: https://git.saurik.com/apple/ld64.git/blobdiff_plain/eaf282aaf65b222563e6b3db98e12d720fb161bf..7f09b9353af9897bf18933788d6a59c152c29edd:/src/ld/passes/dylibs.cpp diff --git a/src/ld/passes/dylibs.cpp b/src/ld/passes/dylibs.cpp index f77f5cd..7edc85c 100644 --- a/src/ld/passes/dylibs.cpp +++ b/src/ld/passes/dylibs.cpp @@ -94,9 +94,11 @@ void doPass(const Options& opts, ld::Internal& state) targetIsWeakImport = fit->weakImport; break; default: - break; + break; } if ( (target != NULL) && (target->definition() == ld::Atom::definitionProxy) ) { + if ( targetIsWeakImport && !opts.allowWeakImports() ) + throwf("weak import of symbol '%s' not supported because of option: -no_weak_imports", target->name()); ld::Atom::WeakImportState curWI = target->weakImportState(); if ( curWI == ld::Atom::weakImportUnset ) { // first use of this proxy, set weak-import based on this usage