aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>1999-08-27 03:41:45 +0000
committerJim Wilson <wilson@gcc.gnu.org>1999-08-26 20:41:45 -0700
commitb122caababcbf0e800b3e252c5a6440560245b9f (patch)
treea35c1fb8e21a037a901b6249f51776495a364547
parenta4efc7d79895f74d3a9f7a6f28ab76b97b2ee816 (diff)
downloadgcc-b122caababcbf0e800b3e252c5a6440560245b9f.zip
gcc-b122caababcbf0e800b3e252c5a6440560245b9f.tar.gz
gcc-b122caababcbf0e800b3e252c5a6440560245b9f.tar.bz2
Fix aranges corruption for non-mips 64 bit targets.
* 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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dwarf2out.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4596ac1..050e2f1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 81792b5..88ddac8 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -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)