diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2012-08-03 22:23:43 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2012-08-03 22:23:43 +0000 |
commit | e7afe4bc70a024db7a506937dadd4d60455bb326 (patch) | |
tree | e82c3dc656a76504e27f5ce2b9da37e848f38d5c /gas/frags.c | |
parent | dff5deeaeb024cc9a9072e229e855592ec3eabb5 (diff) | |
download | binutils-redhat-e7afe4bc70a024db7a506937dadd4d60455bb326.tar.gz |
* frags.c (frag_grow): Never shrink the obstack size requested
below the default.
Diffstat (limited to 'gas/frags.c')
-rw-r--r-- | gas/frags.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gas/frags.c b/gas/frags.c index c6ac4259aa..beb251bb01 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) { |