bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/12760] LTO doesn't work with .gnu.warning section


From: hjl.tools at gmail dot com
Subject: [Bug ld/12760] LTO doesn't work with .gnu.warning section
Date: Sat, 14 May 2011 14:53:40 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12760

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-05-14 14:53:35 
UTC ---
This seems to work:

diff --git a/ld/plugin.c b/ld/plugin.c
index 8425fa3..2cf1fc2 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -940,12 +940,19 @@ plugin_notice (struct bfd_link_info *info,
      definition, and strong symbols will normally cause multiple
      definition errors.  Avoid this by making the symbol appear
      to be undefined.  */
-      else if (((h->type == bfd_link_hash_defweak
+      else if ((h->type == bfd_link_hash_defweak
          || h->type == bfd_link_hash_defined)
         && is_ir_dummy_bfd (h->u.def.section->owner))
-           || (h->type == bfd_link_hash_common
-           && is_ir_dummy_bfd (h->u.c.p->section->owner)))
-    h->type = bfd_link_hash_undefweak;
+    {
+      h->u.undef.abfd = h->u.def.section->owner;
+      h->type = bfd_link_hash_undefweak;
+    }
+      else if (h->type == bfd_link_hash_common
+           && is_ir_dummy_bfd (h->u.c.p->section->owner))
+    {
+      h->u.undef.abfd = h->u.c.p->section->owner;
+      h->type = bfd_link_hash_undefweak;
+    }
     }

   /* Continue with cref/nocrossref/trace-sym processing.  */

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]