From: "Mark E." To: djgpp-workers AT delorie DOT com, pavenis AT lanet DOT lv Date: Mon, 12 Aug 2002 13:34:47 -0400 MIME-Version: 1.0 Subject: Re: Problem with DWARF2 debug info for DJGPP Message-ID: <3D57B977.12209.41E697@localhost> In-reply-to: <3D57C5D7.23156.20C047@localhost> References: <3D554E27 DOT 6498 DOT 1979079 AT localhost> X-mailer: Pegasus Mail for Windows (v4.02) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Try this patch for 2.13. It fixes the problem for me: *** gas/write.c.orig Sat Jun 8 03:37:14 2002 --- gas/write.c Mon Aug 12 13:32:08 2002 *************** set_segment_vma (abfd, sec, xxx) *** 1419,1429 **** PTR xxx ATTRIBUTE_UNUSED; { static bfd_vma addr = 0; ! bfd_set_section_vma (abfd, sec, addr); ! addr += bfd_section_size (abfd, sec); } ! #endif /* BFD_ASSEMBLER && OBJ_COFF && !TE_PE */ /* Finish the subsegments. After every sub-segment, we fake an ".align ...". This conforms to BSD4.2 brane-damage. We then fake --- 1419,1444 ---- PTR xxx ATTRIBUTE_UNUSED; { static bfd_vma addr = 0; + flagword flags; + int debug_section; ! flags = bfd_get_section_flags (abfd, sec); ! debug_section = ((flags & SEC_HAS_CONTENTS) && (flags & SEC_ALLOC) == 0) ! || (flags & SEC_DEBUGGING); ! ! /* Set the vma of debugging sections to zero to keep BFD's DWARF2 reader ! from complaining about bad data when an undefined symbol is reported ! by the linker. */ ! if (debug_section) ! { ! bfd_set_section_vma (abfd, sec, 0); ! return; ! } ! ! bfd_set_section_vma (abfd, sec, addr); ! addr += bfd_section_size (abfd, sec); } ! #endif /* BFD_ASSEMBLER && OBJ_COFF && !TE_GO32 */ /* Finish the subsegments. After every sub-segment, we fake an ".align ...". This conforms to BSD4.2 brane-damage. We then fake