Fix aranges corruption for non-mips 64 bit targets.
authorJim Wilson <wilson@cygnus.com>
Fri, 27 Aug 1999 03:41:45 +0000 (03:41 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 27 Aug 1999 03:41:45 +0000 (20:41 -0700)
* dwarf2out.c (output_aranges): Check DWARF_OFFSET_SIZE not PTR_SIZE
when emitting alignment padding.  Emit padding byte of 0 instead of 4.

From-SVN: r28913

gcc/ChangeLog
gcc/dwarf2out.c

index 4596ac10db1d9a53b7d982262afe9236296b583c..050e2f1d53e1fd1eff40f556b845398ddff3568c 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 Thu Aug 26 18:11:20 1999  Mark Mitchell  <mark@codesourcery.com>
 
        * tree.c (array_type_nelts): Don't create RTL_EXPRs from
index 81792b56490ae6abefc59b63b2fc4c202530fe8f..88ddac8d8c31c8509eb1a0dff9412e3eb5ad7402 100644 (file)
@@ -5682,8 +5682,14 @@ output_aranges ()
             ASM_COMMENT_START);
 
   fputc ('\n', asm_out_file);
-  ASM_OUTPUT_DWARF_DATA4 (asm_out_file, 4);
-  if (PTR_SIZE == 8)
+  /* 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)