diff --git a/input_files.cc b/input_files.cc index 7027d4f9..2e0def48 100644 --- a/input_files.cc +++ b/input_files.cc @@ -212,6 +212,7 @@ private: std::atomic_flag &lock; }; +std::atomic_int do_not_skip; std::atomic_int skip; void ObjectFile::register_defined_symbols() { @@ -234,6 +235,7 @@ void ObjectFile::register_defined_symbols() { if (!sym.file || this->priority < sym.file->priority || (sym.is_weak && !is_weak)) { + do_not_skip++; sym.file = this; sym.input_section = isec; sym.value = esym.st_value; diff --git a/main.cc b/main.cc index 8c3e063e..fc8cbcff 100644 --- a/main.cc +++ b/main.cc @@ -436,8 +436,10 @@ int main(int argc, char **argv) { } { + extern std::atomic_int do_not_skip; extern std::atomic_int skip; - llvm::outs() << "skip=" << skip << "\n"; + llvm::outs() << "do_not_skip=" << do_not_skip + << " skip=" << skip << "\n"; } // Eliminate unused archive members.