bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/13233] --gc-sections discards .debug_types


From: hjl.tools at gmail dot com
Subject: [Bug ld/13233] --gc-sections discards .debug_types
Date: Thu, 29 Sep 2011 00:05:52 +0000

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

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2011-09-29 00:05:52 
UTC ---
I don't see why debug and special sections shouldn't be kept when
they are part of a group:

diff --git a/bfd/elflink.c b/bfd/elflink.c
index a15ad27..6fed561 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -11667,12 +11667,10 @@ _bfd_elf_gc_mark_extra_sections (struct bfd_link_info
*info,
       if (!some_kept)
   continue;

-      /* Keep debug and special sections like .comment when they are
-   not part of a group.  */
+      /* Keep debug and special sections like .comment.  */
       for (isec = ibfd->sections; isec != NULL; isec = isec->next)
-  if (elf_next_in_group (isec) == NULL
-      && ((isec->flags & SEC_DEBUGGING) != 0
-     || (isec->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) == 0))
+  if ((isec->flags & SEC_DEBUGGING) != 0
+      || (isec->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) == 0)
     isec->gc_mark = 1;
     }
   return TRUE;

-- 
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]