aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-xtensa.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-07-05 13:26:38 +0930
committerAlan Modra <amodra@gmail.com>2022-07-09 21:23:00 +0930
commited2917de68fe1ae3f279cef3b48c6464c75e9d72 (patch)
treeba4bd01e9de24ec8372dc32cb8041fe5bb2ebdc3 /gas/config/tc-xtensa.h
parentaf3d7ab74f0aff2eb2af68d0d1df2e27e5757ecd (diff)
downloadgdb-ed2917de68fe1ae3f279cef3b48c6464c75e9d72.zip
gdb-ed2917de68fe1ae3f279cef3b48c6464c75e9d72.tar.gz
gdb-ed2917de68fe1ae3f279cef3b48c6464c75e9d72.tar.bz2
gas: rename md_end to md_finish
Currently md_end is typically used for some final actions rather than freeing memory like other *_end functions. Rename it to md_finish, and rename target implementation. The renaming of target functions makes it possible to find them all with "grep md_finish", eg. md_mips_end is renamed to mips_md_finish, not md_mips_finish. This patch leaves a number of md_end functions unchanged, those that either do nothing or deallocate memory, and calls them late. The idea here is that target maintainers implement md_end functions to tidy memory, if anyone cares. Freeing persistent memory in gas is not at all important, except that it can hide more important memory leaks, those that happen once per some frequent gas operation, amongst these unimportant memory leaks. * as.c (main): Rename md_end to md_finish. * config/tc-alpha.c, * config/tc-alpha.h, * config/tc-arc.c, * config/tc-arc.h, * config/tc-arm.c, * config/tc-arm.h, * config/tc-csky.c, * config/tc-csky.h, * config/tc-ia64.c, * config/tc-ia64.h, * config/tc-mcore.c, * config/tc-mcore.h, * config/tc-mips.c, * config/tc-mips.h, * config/tc-mmix.c, * config/tc-mmix.h, * config/tc-msp430.c, * config/tc-msp430.h, * config/tc-nds32.c, * config/tc-nds32.h, * config/tc-ppc.c, * config/tc-ppc.h, * config/tc-pru.c, * config/tc-pru.h, * config/tc-riscv.c, * config/tc-riscv.h, * config/tc-s390.c, * config/tc-s390.h, * config/tc-sparc.c, * config/tc-sparc.h, * config/tc-tic4x.c, * config/tc-tic4x.h, * config/tc-tic6x.c, * config/tc-tic6x.h, * config/tc-v850.c, * config/tc-v850.h, * config/tc-xtensa.c, * config/tc-xtensa.h, * config/tc-z80.c, * config/tc-z80.h: Similarly. * output-file.c (output_file_close): Call md_end.
Diffstat (limited to 'gas/config/tc-xtensa.h')
-rw-r--r--gas/config/tc-xtensa.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gas/config/tc-xtensa.h b/gas/config/tc-xtensa.h
index 1887558..e67abbc 100644
--- a/gas/config/tc-xtensa.h
+++ b/gas/config/tc-xtensa.h
@@ -329,7 +329,7 @@ extern void xtensa_frag_init (fragS *);
extern int xtensa_force_relocation (struct fix *);
extern int xtensa_validate_fix_sub (struct fix *);
extern void xtensa_frob_label (struct symbol *);
-extern void xtensa_end (void);
+extern void xtensa_md_finish (void);
extern void xtensa_post_relax_hook (void);
extern void xtensa_file_arch_init (bfd *);
extern void xtensa_flush_pending_output (void);
@@ -372,7 +372,7 @@ extern void xtensa_init (int, char **);
#define tc_symbol_new_hook(sym) xtensa_symbol_new_hook (sym)
#define md_do_align(a,b,c,d,e) xtensa_flush_pending_output ()
#define md_elf_section_change_hook xtensa_elf_section_change_hook
-#define md_end xtensa_end
+#define md_finish xtensa_md_finish
#define md_flush_pending_output() xtensa_flush_pending_output ()
#define md_operand(x)
#define TEXT_SECTION_NAME xtensa_section_rename (".text")