From: Tristan Gingold Date: Thu, 3 Dec 2009 14:14:03 +0000 (+0000) Subject: 2009-12-03 Tristan Gingold X-Git-Tag: cygwin-1_7_1-release~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef17cb22d068776deb20642e461f1c90e5dd3bf3;p=external%2Fbinutils.git 2009-12-03 Tristan Gingold * mach-o.c (bfd_mach_o_make_bfd_section): Force debug flags for all sections of the __DWARF segment. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8db9a34..00ae4cf 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2009-12-03 Tristan Gingold + + * mach-o.c (bfd_mach_o_make_bfd_section): Force debug flags for + all sections of the __DWARF segment. + 2009-12-03 Alan Modra PR ld/11047 diff --git a/bfd/mach-o.c b/bfd/mach-o.c index 641fd9b..766fb3d 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -1480,8 +1480,13 @@ bfd_mach_o_make_bfd_section (bfd *abfd, bfd_mach_o_section *section, if (sname == NULL) return NULL; - if (section->flags & BFD_MACH_O_S_ATTR_DEBUG) - flags = SEC_HAS_CONTENTS | SEC_DEBUGGING; + if ((section->flags & BFD_MACH_O_S_ATTR_DEBUG) + || !strcmp (section->segname, "__DWARF")) + { + /* Force flags for dwarf sections. This looks weird but dsym files + have no flags for them and this is important for gdb. */ + flags = SEC_HAS_CONTENTS | SEC_DEBUGGING; + } else { flags = SEC_ALLOC;