aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2011-02-26 04:38:34 +0000
committerH.J. Lu <hjl.tools@gmail.com>2011-02-26 04:38:34 +0000
commit174b85fcf14c36cd2f94d3ae9b21fece3f115466 (patch)
tree1c252f0fe00aeb2d52dea91a393637f1271a0a43
parentb021a2216627b2a56696125ff8a28985aae605e3 (diff)
downloadgdb-174b85fcf14c36cd2f94d3ae9b21fece3f115466.zip
gdb-174b85fcf14c36cd2f94d3ae9b21fece3f115466.tar.gz
gdb-174b85fcf14c36cd2f94d3ae9b21fece3f115466.tar.bz2
Add entry_symbol chain into non_ironly_hash.
2011-02-24 H.J. Lu <hongjiu.lu@intel.com> PR ld/12507 * plugin.c (get_symbols): Don't check entry symbol here. (init_non_ironly_hash): Add entry_symbol chain into non_ironly_hash.
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/plugin.c11
2 files changed, 16 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index c672209..aa459a0 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,6 +1,13 @@
2011-02-24 H.J. Lu <hongjiu.lu@intel.com>
PR ld/12507
+ * plugin.c (get_symbols): Don't check entry symbol here.
+ (init_non_ironly_hash): Add entry_symbol chain into
+ non_ironly_hash.
+
+2011-02-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/12507
* plugin.c (get_symbols): Don't mark entry symbol IR only.
2011-02-18 John David Anglin <dave.anglin@nrc-cnnrc.gc.ca>
diff --git a/ld/plugin.c b/ld/plugin.c
index 6e3f923..7ac2cb8 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -495,8 +495,7 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms)
symbol is externally visible. */
ironly = (!is_visible_from_outside (&syms[n], owner_sec, blhe)
&& !bfd_hash_lookup (non_ironly_hash, syms[n].name,
- FALSE, FALSE)
- && strcmp (syms[n].name, entry_symbol.name) != 0);
+ FALSE, FALSE));
/* If it was originally undefined or common, then it has been
resolved; determine how. */
@@ -845,6 +844,8 @@ plugin_call_cleanup (void)
static void
init_non_ironly_hash (void)
{
+ struct bfd_sym_chain *sym;
+
if (non_ironly_hash == NULL)
{
non_ironly_hash =
@@ -854,6 +855,12 @@ init_non_ironly_hash (void)
sizeof (struct bfd_hash_entry),
61))
einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
+
+ for (sym = &entry_symbol; sym != NULL; sym = sym->next)
+ if (sym->name
+ && !bfd_hash_lookup (non_ironly_hash, sym->name, TRUE, TRUE))
+ einfo (_("%P%X: hash table failure adding symbol %s\n"),
+ sym->name);
}
}