Mail Archives: djgpp-workers/2002/08/13/15:14:02
> Your right. I'll try and make the rule more restrictive just in case.
Here's a more restrictive version:
*** write.c.orig Sat Jun 8 03:37:14 2002
--- write.c Tue Aug 13 14:36:32 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,1456 ----
PTR xxx ATTRIBUTE_UNUSED;
{
static bfd_vma addr = 0;
+ flagword flags;
+ int debug_section, maybe_debug_section;
! flags = bfd_get_section_flags (abfd, sec);
! debug_section = (flags & SEC_DEBUGGING) != 0;
!
! /* SEC_DEBUGGING may not be set for DWARF2 sections.
! Check for them by name to be certain. */
! maybe_debug_section = (flags & SEC_ALLOC) == 0
! && (flags & SEC_HAS_CONTENTS) != 0;
!
! /* 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 && maybe_debug_section)
! {
! const char *sec_name = bfd_get_section_name (abfd, sec);
! if (strncmp (sec_name, ".debug", 6) == 0
! || strncmp (sec_name, ".gnu.linkonce.wi.", 17) == 0)
! debug_section = 1;
! }
!
! 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 -