aboutsummaryrefslogtreecommitdiff
path: root/gas/frags.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-11-14 17:43:32 +0000
committerNick Clifton <nickc@redhat.com>2001-11-14 17:43:32 +0000
commitc1a44b0823606ed5813c912c66f1a67d904656dd (patch)
treee5d1c5b565321efcca47e7bb580b2bc82c195b88 /gas/frags.c
parent25050984999b3830cd4a2c2f94da9b09b915a164 (diff)
downloadgdb-c1a44b0823606ed5813c912c66f1a67d904656dd.zip
gdb-c1a44b0823606ed5813c912c66f1a67d904656dd.tar.gz
gdb-c1a44b0823606ed5813c912c66f1a67d904656dd.tar.bz2
Use frag_make_room() to grow the obstack.
Diffstat (limited to 'gas/frags.c')
-rw-r--r--gas/frags.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gas/frags.c b/gas/frags.c
index 8d7ed2f..e80cced 100644
--- a/gas/frags.c
+++ b/gas/frags.c
@@ -65,6 +65,12 @@ void
frag_grow (nchars)
unsigned int nchars;
{
+ /* Try really hard to grow the obstack. Creating a new obstack can
+ disable expression optimisations that would otherwise occur if
+ two symbols were located in the same obstack. */
+ if (obstack_room (&frchain_now->frch_obstack) < nchars)
+ obstack_make_room (& frchain_now->frch_obstack, 2 * nchars);
+
if (obstack_room (&frchain_now->frch_obstack) < nchars)
{
unsigned int n;