aboutsummaryrefslogtreecommitdiff
path: root/gas/as.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-07-04 12:45:47 +0930
committerAlan Modra <amodra@gmail.com>2022-07-04 22:51:56 +0930
commiteeeaf705fe1c94e9330fa222d7928a9d0f03832a (patch)
treeedbba8cbb9a0deedb2dda7a037511c9ef2031d1b /gas/as.h
parent0772daccb3ebaf513badf4266e1948454b4455c1 (diff)
downloadfsf-binutils-gdb-eeeaf705fe1c94e9330fa222d7928a9d0f03832a.zip
fsf-binutils-gdb-eeeaf705fe1c94e9330fa222d7928a9d0f03832a.tar.gz
fsf-binutils-gdb-eeeaf705fe1c94e9330fa222d7928a9d0f03832a.tar.bz2
alloc gas seginfo on notes obstack
Lots of memory used in gas should go on this obstack. The patch also frees all the gas obstacks on exit, which isn't a completely trivial task. * subsegs.c (alloc_seginfo): New function. (subseg_change, subseg_get): Use it. (subsegs_end): New function. * as.h (subsegs_end): Declare. * output-file.c: Include subsegs.h (stash_frchain_obs): New function. (output_file_close): Save obstacks attached to output bfd before closing. Call subsegs_end with the array of obstacks.
Diffstat (limited to 'gas/as.h')
-rw-r--r--gas/as.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gas/as.h b/gas/as.h
index 470a2e5..ec0c12a 100644
--- a/gas/as.h
+++ b/gas/as.h
@@ -476,6 +476,7 @@ void input_scrub_end (void);
void new_logical_line (const char *, int);
void new_logical_line_flags (const char *, int, int);
void subsegs_begin (void);
+void subsegs_end (struct obstack **);
void subseg_change (segT, int);
segT subseg_new (const char *, subsegT);
segT subseg_force_new (const char *, subsegT);