summaryrefslogtreecommitdiff
path: root/tools/gold/gold-plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gold/gold-plugin.cpp')
-rw-r--r--tools/gold/gold-plugin.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp
index e21a82373f..2cde5d1c57 100644
--- a/tools/gold/gold-plugin.cpp
+++ b/tools/gold/gold-plugin.cpp
@@ -322,8 +322,7 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
cf.syms.push_back(ld_plugin_symbol());
ld_plugin_symbol &sym = cf.syms.back();
- sym.name = const_cast<char *>(M->getSymbolName(i));
- sym.name = strdup(sym.name);
+ sym.name = strdup(M->getSymbolName(i));
sym.version = NULL;
int scope = attrs & LTO_SYMBOL_SCOPE_MASK;