This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
DJGPP object file output update
- From: "Mark E." <snowball3 at softhome dot net>
- To: binutils at sources dot redhat dot com
- Date: Sun, 22 Sep 2002 13:56:18 -0400
- Subject: DJGPP object file output update
Hi all,
gas/write.c contains set_segment_vma which sets the vma for sections in DJGPP object files. It was
added for cosmetic (objdump output) compatibility with non-BFD assembler output. However, this
function causes problems when an unresolved symbol error occurs when dwarf2 debug info is present
because the non-zero vma confuses dwarf2's "find nearest line" routine. Since set_segment_vma isn't
really necessary, it's time to dispense with this function.
Could someone please apply this?
gas/Changelog:
2002-09-22 Mark Elbrecht <snowball3@softhome.net>
* write.c: Delete set_segment_vma and prototype. Update all callers.
Index: write.c
===================================================================
RCS file: /cvs/src/src/gas/write.c,v
retrieving revision 1.61
diff -c -p -r1.61 write.c
*** write.c 19 Sep 2002 23:51:35 -0000 1.61
--- write.c 22 Sep 2002 17:20:57 -0000
*************** static void cvt_frag_to_fill PARAMS ((ob
*** 187,195 ****
static void remove_subsegs PARAMS ((frchainS *, int, fragS **, fragS **));
static void relax_and_size_all_segments PARAMS ((void));
#endif
- #if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32)
- static void set_segment_vma PARAMS ((bfd *, asection *, PTR));
- #endif
/* Create a fixS in obstack 'notes'. */
--- 187,192 ----
*************** set_symtab ()
*** 1375,1393 ****
}
#endif
- #if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32)
- static void
- set_segment_vma (abfd, sec, xxx)
- bfd *abfd;
- asection *sec;
- 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
--- 1372,1377 ----
*************** write_object_file ()
*** 1572,1585 ****
/* Relaxation has completed. Freeze all syms. */
finalize_syms = 1;
-
- #if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32)
- /* Now that the segments have their final sizes, run through the
- sections and set their vma and lma. !BFD gas sets them, and BFD gas
- should too. Currently, only DJGPP uses this code, but other
- COFF targets may need to execute this too. */
- bfd_map_over_sections (stdoutput, set_segment_vma, (char *) 0);
- #endif
#ifndef BFD_ASSEMBLER
/* Crawl the symbol chain.
--- 1556,1561 ----