aboutsummaryrefslogtreecommitdiff
path: root/ld/testplug2.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-02-14 05:45:08 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-02-14 06:26:20 -0800
commitf58926a652e71cc4809758c693ff005d9fdc46e1 (patch)
treee73731491f5bfae0b13388de10c69d06a97ed702 /ld/testplug2.c
parentce875075f9c8acc57bb0ec516ae3ba50064e52b7 (diff)
downloadgdb-f58926a652e71cc4809758c693ff005d9fdc46e1.zip
gdb-f58926a652e71cc4809758c693ff005d9fdc46e1.tar.gz
gdb-f58926a652e71cc4809758c693ff005d9fdc46e1.tar.bz2
Add a testcase for PR ld/17973
ld/ PR ld/17973 * testplug2.c (allsymbolsread_silent): New. (set_register_hook): Handle allsymbolsreadsilent. (onall_symbols_read): Skip a message if allsymbolsread_silent is TRUE. ld/testsuite/ PR ld/17973 * ld-plugin/plugin.exp (regassilent): New. Compile tmpdir/dummy.s and ld-plugin/pr17973.s. (plugin_tests): Add a test for PR ld/17973. * ld-plugin/pr17973.d: New file. * ld-plugin/pr17973.s: Likewise.
Diffstat (limited to 'ld/testplug2.c')
-rw-r--r--ld/testplug2.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ld/testplug2.c b/ld/testplug2.c
index 10f0efb..9b93dd8 100644
--- a/ld/testplug2.c
+++ b/ld/testplug2.c
@@ -125,6 +125,7 @@ static bfd_boolean register_claimfile_hook = TRUE;
static bfd_boolean register_allsymbolsread_hook = FALSE;
static bfd_boolean register_cleanup_hook = FALSE;
static bfd_boolean dumpresolutions = FALSE;
+static bfd_boolean allsymbolsread_silent = FALSE;
/* The master list of all claimable/claimed files. */
static claim_file_t *claimfiles_list = NULL;
@@ -307,6 +308,11 @@ set_register_hook (const char *whichhook, bfd_boolean yesno)
register_claimfile_hook = yesno;
else if (!strcmp ("allsymbolsread", whichhook))
register_allsymbolsread_hook = yesno;
+ else if (!strcmp ("allsymbolsreadsilent", whichhook))
+ {
+ register_allsymbolsread_hook = yesno;
+ allsymbolsread_silent = TRUE;
+ }
else if (!strcmp ("cleanup", whichhook))
register_cleanup_hook = yesno;
else
@@ -573,7 +579,8 @@ onall_symbols_read (void)
char buffer[30];
int fd;
char *filename;
- TV_MESSAGE (LDPL_INFO, "hook called: all symbols read.");
+ if (! allsymbolsread_silent)
+ TV_MESSAGE (LDPL_INFO, "hook called: all symbols read.");
for ( ; claimfile; claimfile = claimfile->next)
{
enum ld_plugin_status rv;