diff options
author | Alan Modra <amodra@gmail.com> | 2022-07-07 19:56:10 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-07-09 21:20:31 +0930 |
commit | 07e64e0b7c6cd4a73220eb57588d0db6b2a192e3 (patch) | |
tree | b21fcb73f362e326904533bdbfa648bb9dce50b3 /gas/as.c | |
parent | c30081c1f955a9fea2da8988bab96191e3d2171e (diff) | |
download | gdb-07e64e0b7c6cd4a73220eb57588d0db6b2a192e3.zip gdb-07e64e0b7c6cd4a73220eb57588d0db6b2a192e3.tar.gz gdb-07e64e0b7c6cd4a73220eb57588d0db6b2a192e3.tar.bz2 |
gas: output_file_close
This is mostly a tidy with the aim of being able to free
out_file_name, but it does fix a possible attempt to unlink the output
file twice (not that that matters).
* as.h (keep_it): New global.
* as.c (keep_it): Delete.
(close_output_file): Delete, merged into..
* output-file.c (output_file_close): ..here. Delete parameter.
* output-file.h (output_file_close): Update prototype.
Diffstat (limited to 'gas/as.c')
-rw-r--r-- | gas/as.c | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -111,9 +111,6 @@ int flag_use_elf_stt_common = DEFAULT_GENERATE_ELF_STT_COMMON; bool flag_generate_build_notes = DEFAULT_GENERATE_BUILD_NOTES; #endif -/* Keep the output file. */ -static int keep_it = 0; - segT reg_section; segT expr_section; segT text_section; @@ -1155,14 +1152,6 @@ dump_statistics (void) #endif } -static void -close_output_file (void) -{ - output_file_close (out_file_name); - if (!keep_it) - unlink_if_ordinary (out_file_name); -} - /* The interface between the macro code and gas expression handling. */ static size_t @@ -1361,7 +1350,7 @@ main (int argc, char ** argv) expr_begin (); /* It has to be called after dump_statistics (). */ - xatexit (close_output_file); + xatexit (output_file_close); if (flag_print_statistics) xatexit (dump_statistics); |