summaryrefslogtreecommitdiff
path: root/tools/gold/gold-plugin.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-02-14 22:23:49 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-02-14 22:23:49 +0000
commit5d618ef7f1ad005fc6912f3e9a08c044b082e47f (patch)
treec70fc8f069793ae42360741c6e8bb92581f5f8f9 /tools/gold/gold-plugin.cpp
parent56519aac04d509e1ce7ec82e79fec1a65227d4ec (diff)
downloadllvm-5d618ef7f1ad005fc6912f3e9a08c044b082e47f.tar.gz
llvm-5d618ef7f1ad005fc6912f3e9a08c044b082e47f.tar.bz2
llvm-5d618ef7f1ad005fc6912f3e9a08c044b082e47f.tar.xz
Switch llvm to using comdats. For now always use groups with a single
section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125526 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gold/gold-plugin.cpp')
-rw-r--r--tools/gold/gold-plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp
index 257c766345..01816aeafc 100644
--- a/tools/gold/gold-plugin.cpp
+++ b/tools/gold/gold-plugin.cpp
@@ -339,6 +339,7 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
}
int definition = attrs & LTO_SYMBOL_DEFINITION_MASK;
+ sym.comdat_key = NULL;
switch (definition) {
case LTO_SYMBOL_DEFINITION_REGULAR:
sym.def = LDPK_DEF;
@@ -350,6 +351,7 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
sym.def = LDPK_COMMON;
break;
case LTO_SYMBOL_DEFINITION_WEAK:
+ sym.comdat_key = sym.name;
sym.def = LDPK_WEAKDEF;
break;
case LTO_SYMBOL_DEFINITION_WEAKUNDEF:
@@ -360,9 +362,7 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
return LDPS_ERR;
}
- // LLVM never emits COMDAT.
sym.size = 0;
- sym.comdat_key = NULL;
sym.resolution = LDPR_UNKNOWN;
}