patch for dwarf2out.c, aranges corruption for non-mips 64 bit targets
Jim Wilson
wilson@cygnus.com
Thu Aug 26 20:44:00 GMT 1999
I have checked in this patch.
Gcc was incorrectly padding the arange section when PTR_SIZE == 8 and
DWARF_OFFSET_SIZE == 4, which is true for all non-mips 64 bit targets.
The problem was that PTR_SIZE was used where DWARF_OFFSET_SIZE should have
been used. The following patch corrects this.
Thu Aug 26 20:36:30 1999 Jim Wilson <wilson@cygnus.com>
* dwarf2out.c (output_aranges): Check DWARF_OFFSET_SIZE not PTR_SIZE
when emitting alignment padding. Emit padding byte of 0 instead of 4.
Index: dwarf2out.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/dwarf2out.c,v
retrieving revision 1.114
diff -p -r1.114 dwarf2out.c
*** dwarf2out.c 1999/08/27 02:40:16 1.114
--- dwarf2out.c 1999/08/27 03:35:50
*************** output_aranges ()
*** 5675,5682 ****
ASM_COMMENT_START);
fputc ('\n', asm_out_file);
! ASM_OUTPUT_DWARF_DATA4 (asm_out_file, 4);
! if (PTR_SIZE == 8)
fprintf (asm_out_file, ",0,0");
if (flag_debug_asm)
--- 5675,5688 ----
ASM_COMMENT_START);
fputc ('\n', asm_out_file);
! /* We need to align to twice the pointer size here.
! If DWARF_OFFSET_SIZE == 4, then we have emitted 12 bytes, and need 4
! bytes of padding to align for either 4 or 8 byte pointers. */
! ASM_OUTPUT_DWARF_DATA4 (asm_out_file, 0);
! /* If DWARF_OFFSET_SIZE == 8, then we have emitted 20 bytes, and need 12
! bytes of padding to align for 8 byte pointers. We have already emitted
! 4 bytes of padding, so emit 8 more here. */
! if (DWARF_OFFSET_SIZE == 8)
fprintf (asm_out_file, ",0,0");
if (flag_debug_asm)
More information about the Gcc-patches
mailing list