aboutsummaryrefslogtreecommitdiff
path: root/gas/frags.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2012-08-03 22:23:44 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2012-08-03 22:23:44 +0000
commit3db8daf394c77169312d5cec31f23e1eaff5c272 (patch)
treecf8d6f66dd864168c709216c71875e19087d3259 /gas/frags.c
parent1a6c3ca2340cd65673e3135a77e496b8b0e84f0b (diff)
downloadgdb-3db8daf394c77169312d5cec31f23e1eaff5c272.zip
gdb-3db8daf394c77169312d5cec31f23e1eaff5c272.tar.gz
gdb-3db8daf394c77169312d5cec31f23e1eaff5c272.tar.bz2
* frags.c (frag_grow): Never shrink the obstack size requested
below the default.
Diffstat (limited to 'gas/frags.c')
-rw-r--r--gas/frags.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gas/frags.c b/gas/frags.c
index c6ac425..beb251b 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)
{