Don't mark entry symbol IR only.
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 24 Feb 2011 22:58:05 +0000 (22:58 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 24 Feb 2011 22:58:05 +0000 (22:58 +0000)
2011-02-24  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/12507
* plugin.c (get_symbols): Don't mark entry symbol IR only.

ld/ChangeLog
ld/plugin.c

index 7b3d9bd939a83a6da37e6600357041dd21e6020b..c6722094e40173562e50cf41ab02b5ad0056698f 100644 (file)
@@ -1,3 +1,8 @@
+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>
 
        PR ld/12376
index 86d80ca4a15e83e783d66b1987eb4e403fb6fba9..6e3f923245345ef346daefca05e303432a318089 100644 (file)
@@ -493,8 +493,10 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms)
         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 = !is_visible_from_outside (&syms[n], owner_sec, blhe)
-       && !bfd_hash_lookup (non_ironly_hash, syms[n].name, FALSE, FALSE);
+      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);
 
       /* If it was originally undefined or common, then it has been
         resolved; determine how.  */