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.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp
index bd11d1b555..119631cfa7 100644
--- a/tools/gold/gold-plugin.cpp
+++ b/tools/gold/gold-plugin.cpp
@@ -197,7 +197,7 @@ ld_plugin_status onload(ld_plugin_tv *tv) {
case LDPT_ADD_SYMBOLS:
add_symbols = tv->tv_u.tv_add_symbols;
break;
- case LDPT_GET_SYMBOLS:
+ case LDPT_GET_SYMBOLS_V2:
get_symbols = tv->tv_u.tv_get_symbols;
break;
case LDPT_ADD_INPUT_FILE:
@@ -386,6 +386,11 @@ static ld_plugin_status all_symbols_read_hook(void) {
if (options::generate_api_file)
api_file << I->syms[i].name << "\n";
+ } else if (I->syms[i].resolution == LDPR_PREVAILING_DEF_IRONLY_EXP) {
+ lto_codegen_add_dso_symbol(code_gen, I->syms[i].name);
+
+ if (options::generate_api_file)
+ api_file << I->syms[i].name << " dso only\n";
}
}
}