From 183da2980e01ddcaf3ccc1d191148603662ad9d0 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Sun, 8 Nov 2020 13:01:46 +0900 Subject: [PATCH] temporary --- main.cc | 8 ++++---- mold.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/main.cc b/main.cc index 9c74b74b..205dc25b 100644 --- a/main.cc +++ b/main.cc @@ -141,10 +141,6 @@ static std::vector> split(const std::vector &input, int unit) { } static void handle_mergeable_strings(std::vector &files) { - static Counter counter("merged_strings"); - for (MergedSection *osec : MergedSection::instances) - counter.inc(osec->map.size()); - // Resolve mergeable string pieces tbb::parallel_for_each(files, [](ObjectFile *file) { for (InputSection *isec : file->mergeable_sections) { @@ -179,6 +175,10 @@ static void handle_mergeable_strings(std::vector &files) { osec->shdr.sh_size += isec->merged_size; } } + + static Counter counter("merged_strings"); + for (MergedSection *osec : MergedSection::instances) + counter.inc(osec->map.size()); } static void bin_sections(std::vector &files) { diff --git a/mold.h b/mold.h index 4ae4facf..5ab5961f 100644 --- a/mold.h +++ b/mold.h @@ -53,6 +53,7 @@ using llvm::object::ELFFile; class Symbol; class InputChunk; class InputSection; +class MergeableSection; class ObjectFile; class OutputChunk; class OutputSection;