aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-07-07 13:32:30 +0930
committerAlan Modra <amodra@gmail.com>2022-07-09 21:22:51 +0930
commitaf3d7ab74f0aff2eb2af68d0d1df2e27e5757ecd (patch)
treee37876fc4fd3989ca030a8ca183631258e1f177d /gas/read.c
parentf1307e43df8e1784416822e6dd67cb2f4215bc1f (diff)
downloadgdb-af3d7ab74f0aff2eb2af68d0d1df2e27e5757ecd.zip
gdb-af3d7ab74f0aff2eb2af68d0d1df2e27e5757ecd.tar.gz
gdb-af3d7ab74f0aff2eb2af68d0d1df2e27e5757ecd.tar.bz2
gas: set up notes obstack earlier
So that the notes obstack can be used for persistent storage in parse_args. * as.c (parse_args): Use notes_alloc and notes_strdup. (free_notes): New function. (main): Init notes obstack, and arrange to be freed on exit. * read.c (read_begin): Don't init notes obstack. (read_end): Free cond_obstack. * subsegs.c (subsegs_end): Don't free cond_obstack or notes.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gas/read.c b/gas/read.c
index edf3f2a..6f3a51d 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -261,9 +261,6 @@ read_begin (void)
pobegin ();
obj_read_begin_hook ();
- /* Something close -- but not too close -- to a multiple of 1024.
- The debugging malloc I'm using has 24 bytes of overhead. */
- obstack_begin (&notes, chunksize);
obstack_begin (&cond_obstack, chunksize);
#ifndef tc_line_separator_chars
@@ -282,6 +279,7 @@ void
read_end (void)
{
poend ();
+ _obstack_free (&cond_obstack, NULL);
}
#ifndef TC_ADDRESS_BYTES