From: Maciej W. Rozycki Date: Fri, 3 Aug 2012 22:23:44 +0000 (+0000) Subject: * frags.c (frag_grow): Never shrink the obstack size requested X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3db8daf394c77169312d5cec31f23e1eaff5c272;p=binutils-gdb.git * frags.c (frag_grow): Never shrink the obstack size requested below the default. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 5c05b2cd414..0ed43121316 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2012-08-03 Maciej W. Rozycki + + * frags.c (frag_grow): Never shrink the obstack size requested + below the default. + 2012-08-02 Sean Keys * config/tc-m68hc11.c (s_m68hc11_parse_pseudo_instruction): diff --git a/gas/frags.c b/gas/frags.c index c6ac4259aab..beb251bb011 100644 --- a/gas/frags.c +++ b/gas/frags.c @@ -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) {