summaryrefslogtreecommitdiff
path: root/linker/linker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r--linker/linker.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 55d684fa7..ac7455bab 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -282,6 +282,14 @@ static linker_stats_t linker_stats;
void count_relocation(RelocationKind kind) {
++linker_stats.count[kind];
}
+
+void print_linker_stats() {
+ PRINT("RELO STATS: %s: %d abs, %d rel, %d copy, %d symbol", g_argv[0],
+ linker_stats.count[kRelocAbsolute],
+ linker_stats.count[kRelocRelative],
+ linker_stats.count[kRelocCopy],
+ linker_stats.count[kRelocSymbol]);
+}
#else
void count_relocation(RelocationKind) {
}