Mail Archives: djgpp-workers/2002/08/12/13:37:25
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
- Raw text -