X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Ffrags.c;h=beb251bb01166e653da9a92f5d51e04077d549a4;hb=bcef180ccbeb8a6a9301065ede1fe038c3040fa5;hp=fe3e78f574437068bb80c7c1d460ba1770ea6095;hpb=6885131b49b28d67e4dc4758edb7e765b8b9f8b7;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/frags.c b/gas/frags.c index fe3e78f574..beb251bb01 100644 --- a/gas/frags.c +++ b/gas/frags.c @@ -1,6 +1,6 @@ /* frags.c - manage frags - Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -101,9 +101,11 @@ frag_grow (unsigned int nchars) if (newc < 0) as_fatal (_("can't extend frag %u chars"), nchars); - /* Force to allocate at least NEWC bytes. */ + /* Force to allocate at least NEWC bytes, but not less than the + default. */ oldc = obstack_chunk_size (&frchain_now->frch_obstack); - obstack_chunk_size (&frchain_now->frch_obstack) = newc; + if (newc > oldc) + obstack_chunk_size (&frchain_now->frch_obstack) = newc; while (obstack_room (&frchain_now->frch_obstack) < nchars) { @@ -394,10 +396,10 @@ frag_append_1_char (int datum) not already accounted for in the frag FR_ADDRESS. */ bfd_boolean -frag_offset_fixed_p (const fragS *frag1, const fragS *frag2, bfd_vma *offset) +frag_offset_fixed_p (const fragS *frag1, const fragS *frag2, offsetT *offset) { const fragS *frag; - bfd_vma off; + offsetT off; /* Start with offset initialised to difference between the two frags. Prior to assigning frag addresses this will be zero. */