aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-10-06 10:07:17 +0000
committerAlan Modra <amodra@gmail.com>2011-10-06 10:07:17 +0000
commit69ee6ab254ad1fd822840f9fd2c1907e13620467 (patch)
tree25633ac79c973e056c1a863e134aae2d9472de8d
parent989993d80a97a66f24c22a34ae9f28d9cd7387ca (diff)
downloadgdb-69ee6ab254ad1fd822840f9fd2c1907e13620467.zip
gdb-69ee6ab254ad1fd822840f9fd2c1907e13620467.tar.gz
gdb-69ee6ab254ad1fd822840f9fd2c1907e13620467.tar.bz2
PR ld/13329
ld/ * plugin.c (tv_header_tags): Add LDPT_GET_SYMBOLS_V2. (set_tv_header): Handle it. Adjust LDPT_GET_SYMBOLS. Return void. (get_symbols): Add def_ironly_exp param. Return that value for syms exported from shared libs. (get_symbols_v1, get_symbols_v2): New wrapper functions. * testplug.c: Update for above changes. ld/testsuite/ * ld-plugin/plugin-1.d, * ld-plugin/plugin-2.d, * ld-plugin/plugin-3.d, * ld-plugin/plugin-4.d, * ld-plugin/plugin-5.d, * ld-plugin/plugin-6.d, * ld-plugin/plugin-7.d, * ld-plugin/plugin-8.d, * ld-plugin/plugin-9.d, * ld-plugin/plugin-10.d, * ld-plugin/plugin-11.d: Update.
-rw-r--r--ld/ChangeLog10
-rw-r--r--ld/plugin.c87
-rw-r--r--ld/testplug.c13
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-plugin/plugin-1.d33
-rw-r--r--ld/testsuite/ld-plugin/plugin-10.d49
-rw-r--r--ld/testsuite/ld-plugin/plugin-11.d55
-rw-r--r--ld/testsuite/ld-plugin/plugin-2.d35
-rw-r--r--ld/testsuite/ld-plugin/plugin-3.d37
-rw-r--r--ld/testsuite/ld-plugin/plugin-4.d37
-rw-r--r--ld/testsuite/ld-plugin/plugin-5.d39
-rw-r--r--ld/testsuite/ld-plugin/plugin-6.d41
-rw-r--r--ld/testsuite/ld-plugin/plugin-7.d43
-rw-r--r--ld/testsuite/ld-plugin/plugin-8.d47
-rw-r--r--ld/testsuite/ld-plugin/plugin-9.d49
15 files changed, 316 insertions, 266 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 428fc5fa..cd067d2 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,13 @@
+2011-10-06 Alan Modra <amodra@gmail.com>
+
+ PR ld/13329
+ * plugin.c (tv_header_tags): Add LDPT_GET_SYMBOLS_V2.
+ (set_tv_header): Handle it. Adjust LDPT_GET_SYMBOLS. Return void.
+ (get_symbols): Add def_ironly_exp param. Return that value for
+ syms exported from shared libs.
+ (get_symbols_v1, get_symbols_v2): New wrapper functions.
+ * testplug.c: Update for above changes.
+
2011-09-27 Kai Tietz <ktietz@redhat.com>
* scripttempl/pe.sc (.text): Add support for
diff --git a/ld/plugin.c b/ld/plugin.c
index b172111..250233b 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -116,6 +116,7 @@ static const enum ld_plugin_tag tv_header_tags[] =
LDPT_GET_INPUT_FILE,
LDPT_RELEASE_INPUT_FILE,
LDPT_GET_SYMBOLS,
+ LDPT_GET_SYMBOLS_V2,
LDPT_ADD_INPUT_FILE,
LDPT_ADD_INPUT_LIBRARY,
LDPT_SET_EXTRA_LIBRARY_PATH
@@ -489,16 +490,19 @@ is_visible_from_outside (struct ld_plugin_symbol *lsym, asection *section,
/* Get the symbol resolution info for a plugin-claimed input file. */
static enum ld_plugin_status
-get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms)
+get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms,
+ int def_ironly_exp)
{
const bfd *abfd = handle;
int n;
+
ASSERT (called_plugin);
for (n = 0; n < nsyms; n++)
{
struct bfd_link_hash_entry *blhe;
- bfd_boolean ironly;
asection *owner_sec;
+ int res;
+
if (syms[n].def != LDPK_UNDEF)
blhe = bfd_link_hash_lookup (link_info.hash, syms[n].name,
FALSE, FALSE, TRUE);
@@ -507,7 +511,7 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms)
syms[n].name, FALSE, FALSE, TRUE);
if (!blhe)
{
- syms[n].resolution = LDPR_UNKNOWN;
+ res = LDPR_UNKNOWN;
goto report_symbol;
}
@@ -515,7 +519,7 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms)
if (blhe->type == bfd_link_hash_undefined
|| blhe->type == bfd_link_hash_undefweak)
{
- syms[n].resolution = LDPR_UNDEF;
+ res = LDPR_UNDEF;
goto report_symbol;
}
if (blhe->type != bfd_link_hash_defined
@@ -534,12 +538,6 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms)
? blhe->u.c.p->section
: blhe->u.def.section);
- /* We need to know if the sym is referenced from non-IR files. Or
- even potentially-referenced, perhaps in a future final link if
- this is a partial one, perhaps dynamically at load-time if the
- symbol is externally visible. */
- ironly = !(blhe->non_ir_ref
- || is_visible_from_outside (&syms[n], owner_sec, blhe));
/* If it was originally undefined or common, then it has been
resolved; determine how. */
@@ -548,49 +546,67 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms)
|| syms[n].def == LDPK_COMMON)
{
if (owner_sec->owner == link_info.output_bfd)
- syms[n].resolution = LDPR_RESOLVED_EXEC;
+ res = LDPR_RESOLVED_EXEC;
else if (owner_sec->owner == abfd)
- syms[n].resolution = (ironly
- ? LDPR_PREVAILING_DEF_IRONLY
- : LDPR_PREVAILING_DEF);
+ res = LDPR_PREVAILING_DEF_IRONLY;
else if (is_ir_dummy_bfd (owner_sec->owner))
- syms[n].resolution = LDPR_RESOLVED_IR;
+ res = LDPR_RESOLVED_IR;
else if (owner_sec->owner != NULL
&& (owner_sec->owner->flags & DYNAMIC) != 0)
- syms[n].resolution = LDPR_RESOLVED_DYN;
+ res = LDPR_RESOLVED_DYN;
else
- syms[n].resolution = LDPR_RESOLVED_EXEC;
- goto report_symbol;
+ res = LDPR_RESOLVED_EXEC;
}
/* Was originally def, or weakdef. Does it prevail? If the
owner is the original dummy bfd that supplied it, then this
is the definition that has prevailed. */
- if (owner_sec->owner == link_info.output_bfd)
- syms[n].resolution = LDPR_PREEMPTED_REG;
+ else if (owner_sec->owner == link_info.output_bfd)
+ res = LDPR_PREEMPTED_REG;
else if (owner_sec->owner == abfd)
- {
- syms[n].resolution = (ironly
- ? LDPR_PREVAILING_DEF_IRONLY
- : LDPR_PREVAILING_DEF);
- goto report_symbol;
- }
+ res = LDPR_PREVAILING_DEF_IRONLY;
/* Was originally def, weakdef, or common, but has been pre-empted. */
- syms[n].resolution = (is_ir_dummy_bfd (owner_sec->owner)
- ? LDPR_PREEMPTED_IR
- : LDPR_PREEMPTED_REG);
+ else if (is_ir_dummy_bfd (owner_sec->owner))
+ res = LDPR_PREEMPTED_IR;
+ else
+ res = LDPR_PREEMPTED_REG;
+
+ if (res == LDPR_PREVAILING_DEF_IRONLY)
+ {
+ /* We need to know if the sym is referenced from non-IR files. Or
+ even potentially-referenced, perhaps in a future final link if
+ this is a partial one, perhaps dynamically at load-time if the
+ symbol is externally visible. */
+ if (blhe->non_ir_ref)
+ res = LDPR_PREVAILING_DEF;
+ else if (is_visible_from_outside (&syms[n], owner_sec, blhe))
+ res = def_ironly_exp;
+ }
report_symbol:
+ syms[n].resolution = res;
if (report_plugin_symbols)
einfo (_("%P: %B: symbol `%s' "
"definition: %d, visibility: %d, resolution: %d\n"),
abfd, syms[n].name,
- syms[n].def, syms[n].visibility, syms[n].resolution);
+ syms[n].def, syms[n].visibility, res);
}
return LDPS_OK;
}
+static enum ld_plugin_status
+get_symbols_v1 (const void *handle, int nsyms, struct ld_plugin_symbol *syms)
+{
+ return get_symbols (handle, nsyms, syms, LDPR_PREVAILING_DEF);
+}
+
+static enum ld_plugin_status
+get_symbols_v2 (const void *handle, int nsyms, struct ld_plugin_symbol *syms)
+{
+ return get_symbols (handle, nsyms, syms, LDPR_PREVAILING_DEF_IRONLY_EXP);
+}
+
/* Add a new (real) input file generated by a plugin. */
static enum ld_plugin_status
add_input_file (const char *pathname)
@@ -658,7 +674,7 @@ message (int level, const char *format, ...)
}
/* Helper to size leading part of tv array and set it up. */
-static size_t
+static void
set_tv_header (struct ld_plugin_tv *tv)
{
size_t i;
@@ -667,9 +683,6 @@ set_tv_header (struct ld_plugin_tv *tv)
static const unsigned int major = (unsigned)(BFD_VERSION / 100000000UL);
static const unsigned int minor = (unsigned)(BFD_VERSION / 1000000UL) % 100;
- if (!tv)
- return tv_header_size;
-
for (i = 0; i < tv_header_size; i++)
{
tv[i].tv_tag = tv_header_tags[i];
@@ -712,7 +725,10 @@ set_tv_header (struct ld_plugin_tv *tv)
TVU(release_input_file) = release_input_file;
break;
case LDPT_GET_SYMBOLS:
- TVU(get_symbols) = get_symbols;
+ TVU(get_symbols) = get_symbols_v1;
+ break;
+ case LDPT_GET_SYMBOLS_V2:
+ TVU(get_symbols) = get_symbols_v2;
break;
case LDPT_ADD_INPUT_FILE:
TVU(add_input_file) = add_input_file;
@@ -730,7 +746,6 @@ set_tv_header (struct ld_plugin_tv *tv)
}
#undef TVU
}
- return tv_header_size;
}
/* Append the per-plugin args list and trailing LDPT_NULL to tv. */
diff --git a/ld/testplug.c b/ld/testplug.c
index f04df10..3be1ed4 100644
--- a/ld/testplug.c
+++ b/ld/testplug.c
@@ -83,6 +83,7 @@ static const tag_name_t tag_names[] =
ADDENTRY(LDPT_REGISTER_CLEANUP_HOOK),
ADDENTRY(LDPT_ADD_SYMBOLS),
ADDENTRY(LDPT_GET_SYMBOLS),
+ ADDENTRY(LDPT_GET_SYMBOLS_V2),
ADDENTRY(LDPT_ADD_INPUT_FILE),
ADDENTRY(LDPT_MESSAGE),
ADDENTRY(LDPT_GET_INPUT_FILE),
@@ -99,6 +100,7 @@ static ld_plugin_register_all_symbols_read tv_register_all_symbols_read = 0;
static ld_plugin_register_cleanup tv_register_cleanup = 0;
static ld_plugin_add_symbols tv_add_symbols = 0;
static ld_plugin_get_symbols tv_get_symbols = 0;
+static ld_plugin_get_symbols tv_get_symbols_v2 = 0;
static ld_plugin_add_input_file tv_add_input_file = 0;
static ld_plugin_message tv_message = 0;
static ld_plugin_get_input_file tv_get_input_file = 0;
@@ -361,6 +363,7 @@ dump_tv_tag (size_t n, struct ld_plugin_tv *tv)
case LDPT_REGISTER_CLEANUP_HOOK:
case LDPT_ADD_SYMBOLS:
case LDPT_GET_SYMBOLS:
+ case LDPT_GET_SYMBOLS_V2:
case LDPT_ADD_INPUT_FILE:
case LDPT_MESSAGE:
case LDPT_GET_INPUT_FILE:
@@ -418,6 +421,9 @@ parse_tv_tag (struct ld_plugin_tv *tv)
case LDPT_GET_SYMBOLS:
SETVAR(tv_get_symbols);
break;
+ case LDPT_GET_SYMBOLS_V2:
+ tv_get_symbols_v2 = tv->tv_u.tv_get_symbols;
+ break;
case LDPT_ADD_INPUT_FILE:
SETVAR(tv_add_input_file);
break;
@@ -562,6 +568,7 @@ onall_symbols_read (void)
"LDPR_RESOLVED_IR",
"LDPR_RESOLVED_EXEC",
"LDPR_RESOLVED_DYN",
+ "LDPR_PREVAILING_DEF_IRONLY_EXP",
};
claim_file_t *claimfile = dumpresolutions ? claimfiles_list : NULL;
add_file_t *addfile = addfiles_list;
@@ -570,12 +577,12 @@ onall_symbols_read (void)
{
enum ld_plugin_status rv;
int n;
- if (claimfile->n_syms_used && !tv_get_symbols)
+ if (claimfile->n_syms_used && !tv_get_symbols_v2)
return LDPS_ERR;
else if (!claimfile->n_syms_used)
continue;
- rv = tv_get_symbols (claimfile->file.handle, claimfile->n_syms_used,
- claimfile->symbols);
+ rv = tv_get_symbols_v2 (claimfile->file.handle, claimfile->n_syms_used,
+ claimfile->symbols);
if (rv != LDPS_OK)
return rv;
for (n = 0; n < claimfile->n_syms_used; n++)
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 4755493..b59aed7 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2011-10-06 Alan Modra <amodra@gmail.com>
+
+ * ld-plugin/plugin-1.d, * ld-plugin/plugin-2.d, * ld-plugin/plugin-3.d,
+ * ld-plugin/plugin-4.d, * ld-plugin/plugin-5.d, * ld-plugin/plugin-6.d,
+ * ld-plugin/plugin-7.d, * ld-plugin/plugin-8.d, * ld-plugin/plugin-9.d,
+ * ld-plugin/plugin-10.d, * ld-plugin/plugin-11.d: Update.
+
2011-10-05 Nick Clifton <nickc@redhat.com>
* ld-scripts/phdrs.exp: Expect to fail for the RX.
diff --git a/ld/testsuite/ld-plugin/plugin-1.d b/ld/testsuite/ld-plugin/plugin-1.d
index 0ce0794..49229f4 100644
--- a/ld/testsuite/ld-plugin/plugin-1.d
+++ b/ld/testsuite/ld-plugin/plugin-1.d
@@ -1,18 +1,19 @@
Hello from testplugin.
-tv\[0\]: LDPT_MESSAGE func@0x.*
-tv\[1\]: LDPT_API_VERSION value 0x1 \(1\)
-tv\[2\]: LDPT_GNU_LD_VERSION value 0x.*
-tv\[3\]: LDPT_LINKER_OUTPUT value 0x1 \(1\)
-tv\[4\]: LDPT_OUTPUT_NAME 'tmpdir/main.x'
-tv\[5\]: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
-tv\[6\]: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
-tv\[7\]: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
-tv\[8\]: LDPT_ADD_SYMBOLS func@0x.*
-tv\[9\]: LDPT_GET_INPUT_FILE func@0x.*
-tv\[10\]: LDPT_RELEASE_INPUT_FILE func@0x.*
-tv\[11\]: LDPT_GET_SYMBOLS func@0x.*
-tv\[12\]: LDPT_ADD_INPUT_FILE func@0x.*
-tv\[13\]: LDPT_ADD_INPUT_LIBRARY func@0x.*
-tv\[14\]: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
-tv\[15\]: LDPT_NULL value 0x0 \(0\)
+.*: LDPT_MESSAGE func@0x.*
+.*: LDPT_API_VERSION value 0x1 \(1\)
+.*: LDPT_GNU_LD_VERSION value 0x.*
+.*: LDPT_LINKER_OUTPUT value 0x1 \(1\)
+.*: LDPT_OUTPUT_NAME 'tmpdir/main.x'
+.*: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
+.*: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
+.*: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
+.*: LDPT_ADD_SYMBOLS func@0x.*
+.*: LDPT_GET_INPUT_FILE func@0x.*
+.*: LDPT_RELEASE_INPUT_FILE func@0x.*
+.*: LDPT_GET_SYMBOLS func@0x.*
+.*: LDPT_GET_SYMBOLS_V2 func@0x.*
+.*: LDPT_ADD_INPUT_FILE func@0x.*
+.*: LDPT_ADD_INPUT_LIBRARY func@0x.*
+.*: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
+.*: LDPT_NULL value 0x0 \(0\)
#...
diff --git a/ld/testsuite/ld-plugin/plugin-10.d b/ld/testsuite/ld-plugin/plugin-10.d
index 7e3c3bb..37c9d9d 100644
--- a/ld/testsuite/ld-plugin/plugin-10.d
+++ b/ld/testsuite/ld-plugin/plugin-10.d
@@ -1,28 +1,29 @@
Hello from testplugin.
-tv\[0\]: LDPT_MESSAGE func@0x.*
-tv\[1\]: LDPT_API_VERSION value 0x1 \(1\)
-tv\[2\]: LDPT_GNU_LD_VERSION value 0x.*
-tv\[3\]: LDPT_LINKER_OUTPUT value 0x1 \(1\)
-tv\[4\]: LDPT_OUTPUT_NAME 'tmpdir/main.x'
-tv\[5\]: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
-tv\[6\]: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
-tv\[7\]: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
-tv\[8\]: LDPT_ADD_SYMBOLS func@0x.*
-tv\[9\]: LDPT_GET_INPUT_FILE func@0x.*
-tv\[10\]: LDPT_RELEASE_INPUT_FILE func@0x.*
-tv\[11\]: LDPT_GET_SYMBOLS func@0x.*
-tv\[12\]: LDPT_ADD_INPUT_FILE func@0x.*
-tv\[13\]: LDPT_ADD_INPUT_LIBRARY func@0x.*
-tv\[14\]: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
-tv\[15\]: LDPT_OPTION 'registerclaimfile'
-tv\[16\]: LDPT_OPTION 'registerallsymbolsread'
-tv\[17\]: LDPT_OPTION 'registercleanup'
-tv\[18\]: LDPT_OPTION 'claim:tmpdir/func.o'
-tv\[19\]: LDPT_OPTION 'sym:_?func::0:0:0'
-tv\[20\]: LDPT_OPTION 'sym:_?func2::0:0:0'
-tv\[21\]: LDPT_OPTION 'dumpresolutions'
-tv\[22\]: LDPT_OPTION 'add:tmpdir/func.o'
-tv\[23\]: LDPT_NULL value 0x0 \(0\)
+.*: LDPT_MESSAGE func@0x.*
+.*: LDPT_API_VERSION value 0x1 \(1\)
+.*: LDPT_GNU_LD_VERSION value 0x.*
+.*: LDPT_LINKER_OUTPUT value 0x1 \(1\)
+.*: LDPT_OUTPUT_NAME 'tmpdir/main.x'
+.*: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
+.*: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
+.*: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
+.*: LDPT_ADD_SYMBOLS func@0x.*
+.*: LDPT_GET_INPUT_FILE func@0x.*
+.*: LDPT_RELEASE_INPUT_FILE func@0x.*
+.*: LDPT_GET_SYMBOLS func@0x.*
+.*: LDPT_GET_SYMBOLS_V2 func@0x.*
+.*: LDPT_ADD_INPUT_FILE func@0x.*
+.*: LDPT_ADD_INPUT_LIBRARY func@0x.*
+.*: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
+.*: LDPT_OPTION 'registerclaimfile'
+.*: LDPT_OPTION 'registerallsymbolsread'
+.*: LDPT_OPTION 'registercleanup'
+.*: LDPT_OPTION 'claim:tmpdir/func.o'
+.*: LDPT_OPTION 'sym:_?func::0:0:0'
+.*: LDPT_OPTION 'sym:_?func2::0:0:0'
+.*: LDPT_OPTION 'dumpresolutions'
+.*: LDPT_OPTION 'add:tmpdir/func.o'
+.*: LDPT_NULL value 0x0 \(0\)
#...
hook called: claim_file tmpdir/main.o \[@0/.* not claimed
hook called: claim_file tmpdir/func.o \[@0/.* CLAIMED
diff --git a/ld/testsuite/ld-plugin/plugin-11.d b/ld/testsuite/ld-plugin/plugin-11.d
index 927cffd..b920429 100644
--- a/ld/testsuite/ld-plugin/plugin-11.d
+++ b/ld/testsuite/ld-plugin/plugin-11.d
@@ -1,31 +1,32 @@
Hello from testplugin.
-tv\[0\]: LDPT_MESSAGE func@0x.*
-tv\[1\]: LDPT_API_VERSION value 0x1 \(1\)
-tv\[2\]: LDPT_GNU_LD_VERSION value 0x.*
-tv\[3\]: LDPT_LINKER_OUTPUT value 0x1 \(1\)
-tv\[4\]: LDPT_OUTPUT_NAME 'tmpdir/main.x'
-tv\[5\]: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
-tv\[6\]: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
-tv\[7\]: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
-tv\[8\]: LDPT_ADD_SYMBOLS func@0x.*
-tv\[9\]: LDPT_GET_INPUT_FILE func@0x.*
-tv\[10\]: LDPT_RELEASE_INPUT_FILE func@0x.*
-tv\[11\]: LDPT_GET_SYMBOLS func@0x.*
-tv\[12\]: LDPT_ADD_INPUT_FILE func@0x.*
-tv\[13\]: LDPT_ADD_INPUT_LIBRARY func@0x.*
-tv\[14\]: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
-tv\[15\]: LDPT_OPTION 'registerclaimfile'
-tv\[16\]: LDPT_OPTION 'registerallsymbolsread'
-tv\[17\]: LDPT_OPTION 'registercleanup'
-tv\[18\]: LDPT_OPTION 'claim:tmpdir/func.o'
-tv\[19\]: LDPT_OPTION 'sym:_?func::0:0:0'
-tv\[20\]: LDPT_OPTION 'sym:_?func2::0:0:0'
-tv\[21\]: LDPT_OPTION 'dumpresolutions'
-tv\[22\]: LDPT_OPTION 'add:tmpdir/func.o'
-tv\[23\]: LDPT_OPTION 'claim:tmpdir/libtext.a'
-tv\[24\]: LDPT_OPTION 'sym:_?text::0:0:0'
-tv\[25\]: LDPT_OPTION 'add:tmpdir/text.o'
-tv\[26\]: LDPT_NULL value 0x0 \(0\)
+.*: LDPT_MESSAGE func@0x.*
+.*: LDPT_API_VERSION value 0x1 \(1\)
+.*: LDPT_GNU_LD_VERSION value 0x.*
+.*: LDPT_LINKER_OUTPUT value 0x1 \(1\)
+.*: LDPT_OUTPUT_NAME 'tmpdir/main.x'
+.*: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
+.*: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
+.*: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
+.*: LDPT_ADD_SYMBOLS func@0x.*
+.*: LDPT_GET_INPUT_FILE func@0x.*
+.*: LDPT_RELEASE_INPUT_FILE func@0x.*
+.*: LDPT_GET_SYMBOLS func@0x.*
+.*: LDPT_GET_SYMBOLS_V2 func@0x.*
+.*: LDPT_ADD_INPUT_FILE func@0x.*
+.*: LDPT_ADD_INPUT_LIBRARY func@0x.*
+.*: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
+.*: LDPT_OPTION 'registerclaimfile'
+.*: LDPT_OPTION 'registerallsymbolsread'
+.*: LDPT_OPTION 'registercleanup'
+.*: LDPT_OPTION 'claim:tmpdir/func.o'
+.*: LDPT_OPTION 'sym:_?func::0:0:0'
+.*: LDPT_OPTION 'sym:_?func2::0:0:0'
+.*: LDPT_OPTION 'dumpresolutions'
+.*: LDPT_OPTION 'add:tmpdir/func.o'
+.*: LDPT_OPTION 'claim:tmpdir/libtext.a'
+.*: LDPT_OPTION 'sym:_?text::0:0:0'
+.*: LDPT_OPTION 'add:tmpdir/text.o'
+.*: LDPT_NULL value 0x0 \(0\)
#...
hook called: claim_file tmpdir/main.o \[@0/.* not claimed
hook called: claim_file tmpdir/func.o \[@0/.* CLAIMED
diff --git a/ld/testsuite/ld-plugin/plugin-2.d b/ld/testsuite/ld-plugin/plugin-2.d
index 677f8fb..0ce111f 100644
--- a/ld/testsuite/ld-plugin/plugin-2.d
+++ b/ld/testsuite/ld-plugin/plugin-2.d
@@ -1,21 +1,22 @@
Hello from testplugin.
-tv\[0\]: LDPT_MESSAGE func@0x.*
-tv\[1\]: LDPT_API_VERSION value 0x1 \(1\)
-tv\[2\]: LDPT_GNU_LD_VERSION value 0x.*
-tv\[3\]: LDPT_LINKER_OUTPUT value 0x1 \(1\)
-tv\[4\]: LDPT_OUTPUT_NAME 'tmpdir/main.x'
-tv\[5\]: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
-tv\[6\]: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
-tv\[7\]: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
-tv\[8\]: LDPT_ADD_SYMBOLS func@0x.*
-tv\[9\]: LDPT_GET_INPUT_FILE func@0x.*
-tv\[10\]: LDPT_RELEASE_INPUT_FILE func@0x.*
-tv\[11\]: LDPT_GET_SYMBOLS func@0x.*
-tv\[12\]: LDPT_ADD_INPUT_FILE func@0x.*
-tv\[13\]: LDPT_ADD_INPUT_LIBRARY func@0x.*
-tv\[14\]: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
-tv\[15\]: LDPT_OPTION 'failonload'
-tv\[16\]: LDPT_NULL value 0x0 \(0\)
+.*: LDPT_MESSAGE func@0x.*
+.*: LDPT_API_VERSION value 0x1 \(1\)
+.*: LDPT_GNU_LD_VERSION value 0x.*
+.*: LDPT_LINKER_OUTPUT value 0x1 \(1\)
+.*: LDPT_OUTPUT_NAME 'tmpdir/main.x'
+.*: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
+.*: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
+.*: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
+.*: LDPT_ADD_SYMBOLS func@0x.*
+.*: LDPT_GET_INPUT_FILE func@0x.*
+.*: LDPT_RELEASE_INPUT_FILE func@0x.*
+.*: LDPT_GET_SYMBOLS func@0x.*
+.*: LDPT_GET_SYMBOLS_V2 func@0x.*
+.*: LDPT_ADD_INPUT_FILE func@0x.*
+.*: LDPT_ADD_INPUT_LIBRARY func@0x.*
+.*: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
+.*: LDPT_OPTION 'failonload'
+.*: LDPT_NULL value 0x0 \(0\)
#...
.*ld.*:.*ldtestplug.*: error loading plugin
#...
diff --git a/ld/testsuite/ld-plugin/plugin-3.d b/ld/testsuite/ld-plugin/plugin-3.d
index 73aba1b..a4b6a7f 100644
--- a/ld/testsuite/ld-plugin/plugin-3.d
+++ b/ld/testsuite/ld-plugin/plugin-3.d
@@ -1,22 +1,23 @@
Hello from testplugin.
-tv\[0\]: LDPT_MESSAGE func@0x.*
-tv\[1\]: LDPT_API_VERSION value 0x1 \(1\)
-tv\[2\]: LDPT_GNU_LD_VERSION value 0x.*
-tv\[3\]: LDPT_LINKER_OUTPUT value 0x1 \(1\)
-tv\[4\]: LDPT_OUTPUT_NAME 'tmpdir/main.x'
-tv\[5\]: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
-tv\[6\]: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
-tv\[7\]: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
-tv\[8\]: LDPT_ADD_SYMBOLS func@0x.*
-tv\[9\]: LDPT_GET_INPUT_FILE func@0x.*
-tv\[10\]: LDPT_RELEASE_INPUT_FILE func@0x.*
-tv\[11\]: LDPT_GET_SYMBOLS func@0x.*
-tv\[12\]: LDPT_ADD_INPUT_FILE func@0x.*
-tv\[13\]: LDPT_ADD_INPUT_LIBRARY func@0x.*
-tv\[14\]: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
-tv\[15\]: LDPT_OPTION 'registerallsymbolsread'
-tv\[16\]: LDPT_OPTION 'failallsymbolsread'
-tv\[17\]: LDPT_NULL value 0x0 \(0\)
+.*: LDPT_MESSAGE func@0x.*
+.*: LDPT_API_VERSION value 0x1 \(1\)
+.*: LDPT_GNU_LD_VERSION value 0x.*
+.*: LDPT_LINKER_OUTPUT value 0x1 \(1\)
+.*: LDPT_OUTPUT_NAME 'tmpdir/main.x'
+.*: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
+.*: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
+.*: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
+.*: LDPT_ADD_SYMBOLS func@0x.*
+.*: LDPT_GET_INPUT_FILE func@0x.*
+.*: LDPT_RELEASE_INPUT_FILE func@0x.*
+.*: LDPT_GET_SYMBOLS func@0x.*
+.*: LDPT_GET_SYMBOLS_V2 func@0x.*
+.*: LDPT_ADD_INPUT_FILE func@0x.*
+.*: LDPT_ADD_INPUT_LIBRARY func@0x.*
+.*: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
+.*: LDPT_OPTION 'registerallsymbolsread'
+.*: LDPT_OPTION 'failallsymbolsread'
+.*: LDPT_NULL value 0x0 \(0\)
#...
.*ld.*:.*ldtestplug.*: plugin reported error after all symbols read
#...
diff --git a/ld/testsuite/ld-plugin/plugin-4.d b/ld/testsuite/ld-plugin/plugin-4.d
index 580cbac..e17565e 100644
--- a/ld/testsuite/ld-plugin/plugin-4.d
+++ b/ld/testsuite/ld-plugin/plugin-4.d
@@ -1,22 +1,23 @@
Hello from testplugin.
-tv\[0\]: LDPT_MESSAGE func@0x.*
-tv\[1\]: LDPT_API_VERSION value 0x1 \(1\)
-tv\[2\]: LDPT_GNU_LD_VERSION value 0x.*
-tv\[3\]: LDPT_LINKER_OUTPUT value 0x1 \(1\)
-tv\[4\]: LDPT_OUTPUT_NAME 'tmpdir/main.x'
-tv\[5\]: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
-tv\[6\]: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
-tv\[7\]: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
-tv\[8\]: LDPT_ADD_SYMBOLS func@0x.*
-tv\[9\]: LDPT_GET_INPUT_FILE func@0x.*
-tv\[10\]: LDPT_RELEASE_INPUT_FILE func@0x.*
-tv\[11\]: LDPT_GET_SYMBOLS func@0x.*
-tv\[12\]: LDPT_ADD_INPUT_FILE func@0x.*
-tv\[13\]: LDPT_ADD_INPUT_LIBRARY func@0x.*
-tv\[14\]: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
-tv\[15\]: LDPT_OPTION 'failcleanup'
-tv\[16\]: LDPT_OPTION 'registercleanup'
-tv\[17\]: LDPT_NULL value 0x0 \(0\)
+.*: LDPT_MESSAGE func@0x.*
+.*: LDPT_API_VERSION value 0x1 \(1\)
+.*: LDPT_GNU_LD_VERSION value 0x.*
+.*: LDPT_LINKER_OUTPUT value 0x1 \(1\)
+.*: LDPT_OUTPUT_NAME 'tmpdir/main.x'
+.*: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
+.*: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
+.*: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
+.*: LDPT_ADD_SYMBOLS func@0x.*
+.*: LDPT_GET_INPUT_FILE func@0x.*
+.*: LDPT_RELEASE_INPUT_FILE func@0x.*
+.*: LDPT_GET_SYMBOLS func@0x.*
+.*: LDPT_GET_SYMBOLS_V2 func@0x.*
+.*: LDPT_ADD_INPUT_FILE func@0x.*
+.*: LDPT_ADD_INPUT_LIBRARY func@0x.*
+.*: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
+.*: LDPT_OPTION 'failcleanup'
+.*: LDPT_OPTION 'registercleanup'
+.*: LDPT_NULL value 0x0 \(0\)
#...
hook called: cleanup.
.*ld.*:.*ldtestplug.*: error in plugin cleanup \(ignored\)
diff --git a/ld/testsuite/ld-plugin/plugin-5.d b/ld/testsuite/ld-plugin/plugin-5.d
index c0ffa66..c0c55c2 100644
--- a/ld/testsuite/ld-plugin/plugin-5.d
+++ b/ld/testsuite/ld-plugin/plugin-5.d
@@ -1,23 +1,24 @@
Hello from testplugin.
-tv\[0\]: LDPT_MESSAGE func@0x.*
-tv\[1\]: LDPT_API_VERSION value 0x1 \(1\)
-tv\[2\]: LDPT_GNU_LD_VERSION value 0x.*
-tv\[3\]: LDPT_LINKER_OUTPUT value 0x1 \(1\)
-tv\[4\]: LDPT_OUTPUT_NAME 'tmpdir/main.x'
-tv\[5\]: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
-tv\[6\]: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
-tv\[7\]: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
-tv\[8\]: LDPT_ADD_SYMBOLS func@0x.*
-tv\[9\]: LDPT_GET_INPUT_FILE func@0x.*
-tv\[10\]: LDPT_RELEASE_INPUT_FILE func@0x.*
-tv\[11\]: LDPT_GET_SYMBOLS func@0x.*
-tv\[12\]: LDPT_ADD_INPUT_FILE func@0x.*
-tv\[13\]: LDPT_ADD_INPUT_LIBRARY func@0x.*
-tv\[14\]: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
-tv\[15\]: LDPT_OPTION 'registerclaimfile'
-tv\[16\]: LDPT_OPTION 'registerallsymbolsread'
-tv\[17\]: LDPT_OPTION 'registercleanup'
-tv\[18\]: LDPT_NULL value 0x0 \(0\)
+.*: LDPT_MESSAGE func@0x.*
+.*: LDPT_API_VERSION value 0x1 \(1\)
+.*: LDPT_GNU_LD_VERSION value 0x.*
+.*: LDPT_LINKER_OUTPUT value 0x1 \(1\)
+.*: LDPT_OUTPUT_NAME 'tmpdir/main.x'
+.*: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
+.*: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
+.*: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
+.*: LDPT_ADD_SYMBOLS func@0x.*
+.*: LDPT_GET_INPUT_FILE func@0x.*
+.*: LDPT_RELEASE_INPUT_FILE func@0x.*
+.*: LDPT_GET_SYMBOLS func@0x.*
+.*: LDPT_GET_SYMBOLS_V2 func@0x.*
+.*: LDPT_ADD_INPUT_FILE func@0x.*
+.*: LDPT_ADD_INPUT_LIBRARY func@0x.*
+.*: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
+.*: LDPT_OPTION 'registerclaimfile'
+.*: LDPT_OPTION 'registerallsymbolsread'
+.*: LDPT_OPTION 'registercleanup'
+.*: LDPT_NULL value 0x0 \(0\)
#...
hook called: claim_file tmpdir/main.o \[@0/.*
hook called: claim_file tmpdir/func.o \[@0/.*
diff --git a/ld/testsuite/ld-plugin/plugin-6.d b/ld/testsuite/ld-plugin/plugin-6.d
index d107d29..f3e13fe 100644
--- a/ld/testsuite/ld-plugin/plugin-6.d
+++ b/ld/testsuite/ld-plugin/plugin-6.d
@@ -1,24 +1,25 @@
Hello from testplugin.
-tv\[0\]: LDPT_MESSAGE func@0x.*
-tv\[1\]: LDPT_API_VERSION value 0x1 \(1\)
-tv\[2\]: LDPT_GNU_LD_VERSION value 0x.*
-tv\[3\]: LDPT_LINKER_OUTPUT value 0x1 \(1\)
-tv\[4\]: LDPT_OUTPUT_NAME 'tmpdir/main.x'
-tv\[5\]: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
-tv\[6\]: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
-tv\[7\]: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
-tv\[8\]: LDPT_ADD_SYMBOLS func@0x.*
-tv\[9\]: LDPT_GET_INPUT_FILE func@0x.*
-tv\[10\]: LDPT_RELEASE_INPUT_FILE func@0x.*
-tv\[11\]: LDPT_GET_SYMBOLS func@0x.*
-tv\[12\]: LDPT_ADD_INPUT_FILE func@0x.*
-tv\[13\]: LDPT_ADD_INPUT_LIBRARY func@0x.*
-tv\[14\]: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
-tv\[15\]: LDPT_OPTION 'registerclaimfile'
-tv\[16\]: LDPT_OPTION 'registerallsymbolsread'
-tv\[17\]: LDPT_OPTION 'registercleanup'
-tv\[18\]: LDPT_OPTION 'claim:tmpdir/func.o'
-tv\[19\]: LDPT_NULL value 0x0 \(0\)
+.*: LDPT_MESSAGE func@0x.*
+.*: LDPT_API_VERSION value 0x1 \(1\)
+.*: LDPT_GNU_LD_VERSION value 0x.*
+.*: LDPT_LINKER_OUTPUT value 0x1 \(1\)
+.*: LDPT_OUTPUT_NAME 'tmpdir/main.x'
+.*: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
+.*: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
+.*: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
+.*: LDPT_ADD_SYMBOLS func@0x.*
+.*: LDPT_GET_INPUT_FILE func@0x.*
+.*: LDPT_RELEASE_INPUT_FILE func@0x.*
+.*: LDPT_GET_SYMBOLS func@0x.*
+.*: LDPT_GET_SYMBOLS_V2 func@0x.*
+.*: LDPT_ADD_INPUT_FILE func@0x.*
+.*: LDPT_ADD_INPUT_LIBRARY func@0x.*
+.*: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
+.*: LDPT_OPTION 'registerclaimfile'
+.*: LDPT_OPTION 'registerallsymbolsread'
+.*: LDPT_OPTION 'registercleanup'
+.*: LDPT_OPTION 'claim:tmpdir/func.o'
+.*: LDPT_NULL value 0x0 \(0\)
#...
hook called: claim_file tmpdir/main.o \[@0/.* not claimed
hook called: claim_file tmpdir/func.o \[@0/.* CLAIMED
diff --git a/ld/testsuite/ld-plugin/plugin-7.d b/ld/testsuite/ld-plugin/plugin-7.d
index 4d0b9d7..357a89b 100644
--- a/ld/testsuite/ld-plugin/plugin-7.d
+++ b/ld/testsuite/ld-plugin/plugin-7.d
@@ -1,25 +1,26 @@
Hello from testplugin.
-tv\[0\]: LDPT_MESSAGE func@0x.*
-tv\[1\]: LDPT_API_VERSION value 0x1 \(1\)
-tv\[2\]: LDPT_GNU_LD_VERSION value 0x.*
-tv\[3\]: LDPT_LINKER_OUTPUT value 0x1 \(1\)
-tv\[4\]: LDPT_OUTPUT_NAME 'tmpdir/main.x'
-tv\[5\]: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
-tv\[6\]: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
-tv\[7\]: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
-tv\[8\]: LDPT_ADD_SYMBOLS func@0x.*
-tv\[9\]: LDPT_GET_INPUT_FILE func@0x.*
-tv\[10\]: LDPT_RELEASE_INPUT_FILE func@0x.*
-tv\[11\]: LDPT_GET_SYMBOLS func@0x.*
-tv\[12\]: LDPT_ADD_INPUT_FILE func@0x.*
-tv\[13\]: LDPT_ADD_INPUT_LIBRARY func@0x.*
-tv\[14\]: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
-tv\[15\]: LDPT_OPTION 'registerclaimfile'
-tv\[16\]: LDPT_OPTION 'registerallsymbolsread'
-tv\[17\]: LDPT_OPTION 'registercleanup'
-tv\[18\]: LDPT_OPTION 'claim:tmpdir/func.o'
-tv\[19\]: LDPT_OPTION 'sym:_?func::0:0:0'
-tv\[20\]: LDPT_NULL value 0x0 \(0\)
+.*: LDPT_MESSAGE func@0x.*
+.*: LDPT_API_VERSION value 0x1 \(1\)
+.*: LDPT_GNU_LD_VERSION value 0x.*
+.*: LDPT_LINKER_OUTPUT value 0x1 \(1\)
+.*: LDPT_OUTPUT_NAME 'tmpdir/main.x'
+.*: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
+.*: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
+.*: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
+.*: LDPT_ADD_SYMBOLS func@0x.*
+.*: LDPT_GET_INPUT_FILE func@0x.*
+.*: LDPT_RELEASE_INPUT_FILE func@0x.*
+.*: LDPT_GET_SYMBOLS func@0x.*
+.*: LDPT_GET_SYMBOLS_V2 func@0x.*
+.*: LDPT_ADD_INPUT_FILE func@0x.*
+.*: LDPT_ADD_INPUT_LIBRARY func@0x.*
+.*: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
+.*: LDPT_OPTION 'registerclaimfile'
+.*: LDPT_OPTION 'registerallsymbolsread'
+.*: LDPT_OPTION 'registercleanup'
+.*: LDPT_OPTION 'claim:tmpdir/func.o'
+.*: LDPT_OPTION 'sym:_?func::0:0:0'
+.*: LDPT_NULL value 0x0 \(0\)
#...
hook called: claim_file tmpdir/main.o \[@0/.* not claimed
hook called: claim_file tmpdir/func.o \[@0/.* CLAIMED
diff --git a/ld/testsuite/ld-plugin/plugin-8.d b/ld/testsuite/ld-plugin/plugin-8.d
index a589f01..72c86c6 100644
--- a/ld/testsuite/ld-plugin/plugin-8.d
+++ b/ld/testsuite/ld-plugin/plugin-8.d
@@ -1,27 +1,28 @@
Hello from testplugin.
-tv\[0\]: LDPT_MESSAGE func@0x.*
-tv\[1\]: LDPT_API_VERSION value 0x1 \(1\)
-tv\[2\]: LDPT_GNU_LD_VERSION value 0x.*
-tv\[3\]: LDPT_LINKER_OUTPUT value 0x1 \(1\)
-tv\[4\]: LDPT_OUTPUT_NAME 'tmpdir/main.x'
-tv\[5\]: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
-tv\[6\]: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
-tv\[7\]: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
-tv\[8\]: LDPT_ADD_SYMBOLS func@0x.*
-tv\[9\]: LDPT_GET_INPUT_FILE func@0x.*
-tv\[10\]: LDPT_RELEASE_INPUT_FILE func@0x.*
-tv\[11\]: LDPT_GET_SYMBOLS func@0x.*
-tv\[12\]: LDPT_ADD_INPUT_FILE func@0x.*
-tv\[13\]: LDPT_ADD_INPUT_LIBRARY func@0x.*
-tv\[14\]: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
-tv\[15\]: LDPT_OPTION 'registerclaimfile'
-tv\[16\]: LDPT_OPTION 'registerallsymbolsread'
-tv\[17\]: LDPT_OPTION 'registercleanup'
-tv\[18\]: LDPT_OPTION 'claim:tmpdir/func.o'
-tv\[19\]: LDPT_OPTION 'sym:_?func::0:0:0'
-tv\[20\]: LDPT_OPTION 'sym:_?func2::0:0:0'
-tv\[21\]: LDPT_OPTION 'dumpresolutions'
-tv\[22\]: LDPT_NULL value 0x0 \(0\)
+.*: LDPT_MESSAGE func@0x.*
+.*: LDPT_API_VERSION value 0x1 \(1\)
+.*: LDPT_GNU_LD_VERSION value 0x.*
+.*: LDPT_LINKER_OUTPUT value 0x1 \(1\)
+.*: LDPT_OUTPUT_NAME 'tmpdir/main.x'
+.*: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
+.*: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
+.*: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
+.*: LDPT_ADD_SYMBOLS func@0x.*
+.*: LDPT_GET_INPUT_FILE func@0x.*
+.*: LDPT_RELEASE_INPUT_FILE func@0x.*
+.*: LDPT_GET_SYMBOLS func@0x.*
+.*: LDPT_GET_SYMBOLS_V2 func@0x.*
+.*: LDPT_ADD_INPUT_FILE func@0x.*
+.*: LDPT_ADD_INPUT_LIBRARY func@0x.*
+.*: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
+.*: LDPT_OPTION 'registerclaimfile'
+.*: LDPT_OPTION 'registerallsymbolsread'
+.*: LDPT_OPTION 'registercleanup'
+.*: LDPT_OPTION 'claim:tmpdir/func.o'
+.*: LDPT_OPTION 'sym:_?func::0:0:0'
+.*: LDPT_OPTION 'sym:_?func2::0:0:0'
+.*: LDPT_OPTION 'dumpresolutions'
+.*: LDPT_NULL value 0x0 \(0\)
#...
hook called: claim_file tmpdir/main.o \[@0/.* not claimed
hook called: claim_file tmpdir/func.o \[@0/.* CLAIMED
diff --git a/ld/testsuite/ld-plugin/plugin-9.d b/ld/testsuite/ld-plugin/plugin-9.d
index b74f4a6..c2ebc6b 100644
--- a/ld/testsuite/ld-plugin/plugin-9.d
+++ b/ld/testsuite/ld-plugin/plugin-9.d
@@ -1,28 +1,29 @@
Hello from testplugin.
-tv\[0\]: LDPT_MESSAGE func@0x.*
-tv\[1\]: LDPT_API_VERSION value 0x1 \(1\)
-tv\[2\]: LDPT_GNU_LD_VERSION value 0x.*
-tv\[3\]: LDPT_LINKER_OUTPUT value 0x1 \(1\)
-tv\[4\]: LDPT_OUTPUT_NAME 'tmpdir/main.x'
-tv\[5\]: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
-tv\[6\]: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
-tv\[7\]: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
-tv\[8\]: LDPT_ADD_SYMBOLS func@0x.*
-tv\[9\]: LDPT_GET_INPUT_FILE func@0x.*
-tv\[10\]: LDPT_RELEASE_INPUT_FILE func@0x.*
-tv\[11\]: LDPT_GET_SYMBOLS func@0x.*
-tv\[12\]: LDPT_ADD_INPUT_FILE func@0x.*
-tv\[13\]: LDPT_ADD_INPUT_LIBRARY func@0x.*
-tv\[14\]: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
-tv\[15\]: LDPT_OPTION 'registerclaimfile'
-tv\[16\]: LDPT_OPTION 'registerallsymbolsread'
-tv\[17\]: LDPT_OPTION 'registercleanup'
-tv\[18\]: LDPT_OPTION 'claim:tmpdir/func.o'
-tv\[19\]: LDPT_OPTION 'sym:_?func::0:0:0'
-tv\[20\]: LDPT_OPTION 'sym:_?func2::0:0:0'
-tv\[21\]: LDPT_OPTION 'dumpresolutions'
-tv\[22\]: LDPT_OPTION 'add:tmpdir/func.o'
-tv\[23\]: LDPT_NULL value 0x0 \(0\)
+.*: LDPT_MESSAGE func@0x.*
+.*: LDPT_API_VERSION value 0x1 \(1\)
+.*: LDPT_GNU_LD_VERSION value 0x.*
+.*: LDPT_LINKER_OUTPUT value 0x1 \(1\)
+.*: LDPT_OUTPUT_NAME 'tmpdir/main.x'
+.*: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
+.*: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
+.*: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
+.*: LDPT_ADD_SYMBOLS func@0x.*
+.*: LDPT_GET_INPUT_FILE func@0x.*
+.*: LDPT_RELEASE_INPUT_FILE func@0x.*
+.*: LDPT_GET_SYMBOLS func@0x.*
+.*: LDPT_GET_SYMBOLS_V2 func@0x.*
+.*: LDPT_ADD_INPUT_FILE func@0x.*
+.*: LDPT_ADD_INPUT_LIBRARY func@0x.*
+.*: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
+.*: LDPT_OPTION 'registerclaimfile'
+.*: LDPT_OPTION 'registerallsymbolsread'
+.*: LDPT_OPTION 'registercleanup'
+.*: LDPT_OPTION 'claim:tmpdir/func.o'
+.*: LDPT_OPTION 'sym:_?func::0:0:0'
+.*: LDPT_OPTION 'sym:_?func2::0:0:0'
+.*: LDPT_OPTION 'dumpresolutions'
+.*: LDPT_OPTION 'add:tmpdir/func.o'
+.*: LDPT_NULL value 0x0 \(0\)
#...
hook called: claim_file tmpdir/main.o \[@0/.* not claimed
hook called: claim_file tmpdir/func.o \[@0/.* CLAIMED