diff options
author | Alan Modra <amodra@gmail.com> | 2022-07-07 13:32:30 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-07-09 21:22:51 +0930 |
commit | af3d7ab74f0aff2eb2af68d0d1df2e27e5757ecd (patch) | |
tree | e37876fc4fd3989ca030a8ca183631258e1f177d /gas/read.c | |
parent | f1307e43df8e1784416822e6dd67cb2f4215bc1f (diff) | |
download | fsf-binutils-gdb-af3d7ab74f0aff2eb2af68d0d1df2e27e5757ecd.zip fsf-binutils-gdb-af3d7ab74f0aff2eb2af68d0d1df2e27e5757ecd.tar.gz fsf-binutils-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.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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 (¬es, 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 |