gas/ChangeLog
authorAlan Modra <amodra@gmail.com>
Thu, 15 Nov 2001 05:18:22 +0000 (05:18 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 15 Nov 2001 05:18:22 +0000 (05:18 +0000)
* dwarf2dbg.c (get_frag_fix): Align last frag size.

gas/ChangeLog
gas/dwarf2dbg.c

index ea2e1d2bf73aaa497ed1ece66f6abf3e936082cd..28afc0ba086d0503172ed319b03d6899f7dc6c8d 100644 (file)
@@ -1,5 +1,7 @@
 2001-11-15  Alan Modra  <amodra@bigpond.net.au>
 
+       * dwarf2dbg.c (get_frag_fix): Align last frag size.
+
        * config/tc-ppc.c (ppc_insert_operand): Pass (ppc_cpu | ppc_size)
        to operand->insert.
        (md_assemble): Likewise.
index 55a5205fac0aa21fd6aa130a75689d126844a8bc..9807e5eed8e315695ea000a3b89eb3b3a4c75ac2 100644 (file)
@@ -524,8 +524,9 @@ get_frag_fix (frag)
   for (fr = frchain_root; fr; fr = fr->frch_next)
     if (fr->frch_last == frag)
       {
-       return ((char *) obstack_next_free (&fr->frch_obstack)
-               - frag->fr_literal);
+       long align_mask = -1 << get_recorded_alignment (fr->frch_seg);
+       return (((char *) obstack_next_free (&fr->frch_obstack)
+                - frag->fr_literal) + ~align_mask) & align_mask;
       }
 
   abort ();