aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2011-09-26 23:00:17 +0000
committerCary Coutant <ccoutant@google.com>2011-09-26 23:00:17 +0000
commit235061c2f42cd86207e5a4e624f4d44ed49a0803 (patch)
treef40a09754cb8bde44dd54d57d02891593f397338 /gold/testsuite
parente91d10767a42a2267f52b69ddb5bca1fdc44f385 (diff)
downloadgdb-235061c2f42cd86207e5a4e624f4d44ed49a0803.zip
gdb-235061c2f42cd86207e5a4e624f4d44ed49a0803.tar.gz
gdb-235061c2f42cd86207e5a4e624f4d44ed49a0803.tar.bz2
include/ChangeLog
gcc PR lto/47247 * plugin-api.h (enum ld_plugin_symbol_resolution): Add LDPR_PREVAILING_DEF_IRONLY_EXP. (enum ld_plugin_tag): Add LDPT_GET_SYMBOLS_V2. gold/ChangeLog gcc PR lto/47247 * plugin.cc (get_symbols_v2): New function. (Plugin::load): Add LDPT_GET_SYMBOLS_V2. (is_referenced_from_outside): New function. (Pluginobj::get_symbol_resolution_info): Add version parameter, return LDPR_PREVAILING_DEF_IRONLY_EXP when using new version. (get_symbols): Pass version parameter. (get_symbols_v2): New function. * plugin.h (Pluginobj::get_symbol_resolution_info): Add version parameter. * testsuite/plugin_test.c (get_symbols_v2): New static variable. (onload): Add LDPT_GET_SYMBOLS_V2. (all_symbols_read_hook): Use get_symbols_v2; check for LDPR_PREVAILING_DEF_IRONLY_EXP. * testsuite/plugin_test_3.sh: Update expected results.
Diffstat (limited to 'gold/testsuite')
-rw-r--r--gold/testsuite/plugin_test.c13
-rwxr-xr-xgold/testsuite/plugin_test_3.sh2
2 files changed, 11 insertions, 4 deletions
diff --git a/gold/testsuite/plugin_test.c b/gold/testsuite/plugin_test.c
index 619a160..47d400a 100644
--- a/gold/testsuite/plugin_test.c
+++ b/gold/testsuite/plugin_test.c
@@ -56,6 +56,7 @@ static ld_plugin_register_all_symbols_read register_all_symbols_read_hook = NULL
static ld_plugin_register_cleanup register_cleanup_hook = NULL;
static ld_plugin_add_symbols add_symbols = NULL;
static ld_plugin_get_symbols get_symbols = NULL;
+static ld_plugin_get_symbols get_symbols_v2 = NULL;
static ld_plugin_add_input_file add_input_file = NULL;
static ld_plugin_message message = NULL;
static ld_plugin_get_input_file get_input_file = NULL;
@@ -120,6 +121,9 @@ onload(struct ld_plugin_tv *tv)
case LDPT_GET_SYMBOLS:
get_symbols = entry->tv_u.tv_get_symbols;
break;
+ case LDPT_GET_SYMBOLS_V2:
+ get_symbols_v2 = entry->tv_u.tv_get_symbols;
+ break;
case LDPT_ADD_INPUT_FILE:
add_input_file = entry->tv_u.tv_add_input_file;
break;
@@ -394,9 +398,9 @@ all_symbols_read_hook(void)
(*message)(LDPL_INFO, "all symbols read hook called");
- if (get_symbols == NULL)
+ if (get_symbols_v2 == NULL)
{
- fprintf(stderr, "tv_get_symbols interface missing\n");
+ fprintf(stderr, "tv_get_symbols (v2) interface missing\n");
return LDPS_ERR;
}
@@ -404,7 +408,7 @@ all_symbols_read_hook(void)
claimed_file != NULL;
claimed_file = claimed_file->next)
{
- (*get_symbols)(claimed_file->handle, claimed_file->nsyms,
+ (*get_symbols_v2)(claimed_file->handle, claimed_file->nsyms,
claimed_file->syms);
for (i = 0; i < claimed_file->nsyms; ++i)
@@ -423,6 +427,9 @@ all_symbols_read_hook(void)
case LDPR_PREVAILING_DEF_IRONLY:
res = "PREVAILING_DEF_IRONLY";
break;
+ case LDPR_PREVAILING_DEF_IRONLY_EXP:
+ res = "PREVAILING_DEF_IRONLY_EXP";
+ break;
case LDPR_PREEMPTED_REG:
res = "PREEMPTED_REG";
break;
diff --git a/gold/testsuite/plugin_test_3.sh b/gold/testsuite/plugin_test_3.sh
index 961df15..39356d1 100755
--- a/gold/testsuite/plugin_test_3.sh
+++ b/gold/testsuite/plugin_test_3.sh
@@ -46,7 +46,7 @@ check plugin_test_3.err "two_file_test_main.o: claim file hook called"
check plugin_test_3.err "two_file_test_1.syms: claim file hook called"
check plugin_test_3.err "two_file_test_1b.syms: claim file hook called"
check plugin_test_3.err "two_file_test_2.syms: claim file hook called"
-check plugin_test_3.err "two_file_test_1.syms: _Z4f13iv: PREVAILING_DEF_REG"
+check plugin_test_3.err "two_file_test_1.syms: _Z4f13iv: PREVAILING_DEF_IRONLY_EXP"
check plugin_test_3.err "two_file_test_1.syms: _Z2t2v: PREVAILING_DEF_REG"
check plugin_test_3.err "two_file_test_1.syms: v2: RESOLVED_IR"
check plugin_test_3.err "two_file_test_1.syms: t17data: RESOLVED_IR"