public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: PR ld/12507: Can't build a program with -flto -nostdlib
@ 2011-02-24 22:59 H.J. Lu
  2011-02-25 22:45 ` Dave Korn
  2011-02-25 23:30 ` Alan Modra
  0 siblings, 2 replies; 13+ messages in thread
From: H.J. Lu @ 2011-02-24 22:59 UTC (permalink / raw)
  To: binutils

We should never mark entry symbol IR only. I checked in this patch as
an obvious fix.

H.J.
----
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 7b3d9bd..c672209 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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
diff --git a/ld/plugin.c b/ld/plugin.c
index 628db41..7892e36 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -490,8 +490,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.  */

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-02-26  9:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-24 22:59 PATCH: PR ld/12507: Can't build a program with -flto -nostdlib H.J. Lu
2011-02-25 22:45 ` Dave Korn
2011-02-25 23:08   ` H.J. Lu
2011-02-25 23:30 ` Alan Modra
2011-02-25 23:45   ` H.J. Lu
2011-02-25 23:59     ` Alan Modra
2011-02-26  0:09       ` Rafael Ávila de Espíndola
2011-02-26  4:34         ` H.J. Lu
2011-02-26  5:16           ` Rafael Ávila de Espíndola
2011-02-26  5:32             ` H.J. Lu
2011-02-26  4:33       ` H.J. Lu
2011-02-26  4:36         ` H.J. Lu
2011-02-26  9:04         ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).