cond_finish_check (-1);
-#ifdef md_end
- md_end ();
+#ifdef md_finish
+ md_finish ();
#endif
#if defined OBJ_ELF || defined OBJ_MAYBE_ELF
unless the compiler has done it for us. */
void
-alpha_elf_md_end (void)
+alpha_elf_md_finish (void)
{
struct alpha_elf_frame_data *p;
#endif
#ifdef OBJ_ELF
-#define md_end alpha_elf_md_end
-extern void alpha_elf_md_end (void);
+#define md_finish alpha_elf_md_finish
+extern void alpha_elf_md_finish (void);
#endif
/* New fields for supporting explicit relocations (such as !literal to mark
/* Add the default contents for the .ARC.attributes section. */
void
-arc_md_end (void)
+arc_md_finish (void)
{
arc_set_public_attributes ();
#define obj_adjust_symtab() arc_adjust_symtab ()
/* Object attribute hooks. */
-#define md_end arc_md_end
+#define md_finish arc_md_finish
#define CONVERT_SYMBOLIC_ATTRIBUTE(name) arc_convert_symbolic_attribute (name)
#ifndef TC_COPY_SYMBOL_ATTRIBUTES
#define TC_COPY_SYMBOL_ATTRIBUTES(DEST, SRC) \
extern void arc_copy_symbol_attributes (symbolS *, symbolS *);
extern int arc_convert_symbolic_attribute (const char *);
-extern void arc_md_end (void);
+extern void arc_md_finish (void);
extern void arc_adjust_symtab (void);
extern int arc_pcrel_adjust (fragS *);
extern bool arc_parse_name (const char *, struct expressionS *);
/* Add the default contents for the .ARM.attributes section. */
void
-arm_md_end (void)
+arm_md_finish (void)
{
if (EF_ARM_EABI_VERSION (meabi_flags) < EF_ARM_EABI_VER4)
return;
#define tc_frob_fake_label(S) arm_frob_label (S)
#ifdef OBJ_ELF
-#define md_end arm_md_end
-extern void arm_md_end (void);
+#define md_finish arm_md_finish
+extern void arm_md_finish (void);
bool arm_is_eabi (void);
#define md_post_relax_hook arm_md_post_relax ()
/* MD interface: Symbol and relocation handling. */
-void md_csky_end (void)
+void csky_md_finish (void)
{
dump_literals (0);
}
#define TC_GENERIC_RELAX_TABLE csky_relax_table
-#define md_end md_csky_end
+#define md_finish csky_md_finish
#define md_relax_frag csky_relax_frag
#define DOUBLESLASH_LINE_COMMENTS
#define LOCAL_LABELS_FB 1
#include "write.h"
extern const relax_typeS csky_relax_table [];
-extern void md_csky_end (void);
+extern void csky_md_finish (void);
extern void csky_cons_fix_new (fragS *,
unsigned int off,
unsigned int len,
}
void
-ia64_end_of_source (void)
+ia64_md_finish (void)
{
/* terminate insn group upon reaching end of file: */
insn_group_break (1, 0, 0);
enum ia64_opnd opnd;
};
-extern void ia64_end_of_source (void);
+extern void ia64_md_finish (void);
extern void ia64_start_line (void);
extern int ia64_unrecognized_line (int);
extern void ia64_frob_label (struct symbol *);
extern int ia64_estimate_size_before_relax (fragS *, asection *);
extern void ia64_convert_frag (fragS *);
-#define md_end() ia64_end_of_source ()
+#define md_finish() ia64_md_finish ()
#define md_start_line_hook() ia64_start_line ()
#define tc_unrecognized_line(ch) ia64_unrecognized_line (ch)
#define tc_frob_label(s) ia64_frob_label (s)
}
void
-md_mcore_end (void)
+mcore_md_finish (void)
{
dump_literals (0);
subseg_set (text_section, 0);
extern const struct relax_type md_relax_table[];
#define TC_GENERIC_RELAX_TABLE md_relax_table
-#define md_end md_mcore_end
+#define md_finish mcore_md_finish
/* Want the section information too... */
#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
#include "write.h" /* For definition of fixS */
-extern void md_mcore_end (void);
+extern void mcore_md_finish (void);
extern arelent *tc_gen_reloc (asection *, fixS *);
extern int mcore_force_relocation (fixS *);
extern bool mcore_fix_adjustable (fixS *);
}
void
-md_mips_end (void)
+mips_md_finish (void)
{
int fpabi = Val_GNU_MIPS_ABI_FP_ANY;
#endif
-extern void md_mips_end (void);
-#define md_end() md_mips_end()
+extern void mips_md_finish (void);
+#define md_finish() mips_md_finish()
extern void mips_pop_insert (void);
#define md_pop_insert() mips_pop_insert()
{
switch (fragP->fr_subtype)
{
- /* Growth for this type has been handled by mmix_md_end and
+ /* Growth for this type has been handled by mmix_md_finish and
correctly estimated, so there's nothing more to do here. */
case STATE_GREG_DEF:
return 0;
/* Various things we punt until all input is seen. */
void
-mmix_md_end (void)
+mmix_md_finish (void)
{
fragS *fragP;
symbolS *mainsym;
extern void mmix_md_begin (void);
#define md_begin mmix_md_begin
-extern void mmix_md_end (void);
-#define md_end mmix_md_end
+extern void mmix_md_finish (void);
+#define md_finish mmix_md_finish
extern int mmix_current_location \
(void (*fn) (expressionS *), expressionS *);
This is only used for validating the attributes in the assembly file against
the options gas has been invoked with. If the attributes and options are
compatible then we add the attributes to the assembly file in
- msp430_md_end. */
+ msp430_md_finish. */
static void
msp430_object_attribute (int attr_type)
{
/* Called after all assembly has been done. */
void
-msp430_md_end (void)
+msp430_md_finish (void)
{
if (check_for_nop)
{
is A5A5h... */
#define NUMBERS_WITH_SUFFIX 1
-#define md_end msp430_md_end
-extern void msp430_md_end (void);
+#define md_finish msp430_md_finish
+extern void msp430_md_finish (void);
/* Do not allow call frame debug info optimization as otherwise we could
generate the DWARF directives without the relocs necessary to patch
}
void
-md_end (void)
+md_finish (void)
{
nds32_elf_insert_final_frag ();
nds32_elf_analysis_relax_hint ();
extern void nds32_start_line_hook (void);
extern void nds32_elf_section_change_hook (void);
extern void md_begin (void);
-extern void md_end (void);
+extern void md_finish (void);
extern int nds32_start_label (int, int);
extern void nds32_cleanup (void);
extern void nds32_flush_pending_output (void);
(NEXT_CHAR == ':' && nds32_start_label (0, 0))
#define tc_check_label(label) nds32_check_label (label)
#define tc_frob_label(label) nds32_frob_label (label)
-#define md_end md_end
+#define md_finish md_finish
#define md_start_line_hook() nds32_start_line_hook ()
#define md_cons_align(n) nds32_cons_align (n)
/* COLE: TODO: Review md_do_align. */
/* Set ABI version in output file. */
void
-ppc_elf_end (void)
+ppc_elf_md_finish (void)
{
if (ppc_obj64 && ppc_abiversion != 0)
{
}
void
-ppc_xcoff_end (void)
+ppc_xcoff_md_finish (void)
{
int i;
symbol_get_tc (dest)->within = symbol_get_tc (src)->within; \
} while (0)
-extern void ppc_xcoff_end (void);
-#define md_end ppc_xcoff_end
+extern void ppc_xcoff_md_finish (void);
+#define md_finish ppc_xcoff_md_finish
#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) \
ppc_xcoff_parse_cons (EXP, NBYTES)
#define tc_adjust_symtab() ppc_elf_adjust_symtab ()
extern void ppc_elf_adjust_symtab (void);
-extern void ppc_elf_end (void);
-#define md_end ppc_elf_end
+extern void ppc_elf_md_finish (void);
+#define md_finish ppc_elf_md_finish
#endif /* OBJ_ELF */
/* Called just before the assembler exits. */
void
-md_end (void)
+pru_md_end (void)
{
htab_delete (pru_opcode_hash);
htab_delete (pru_reg_hash);
/* Function prototypes exported to rest of GAS. */
extern void md_assemble (char *op_str);
-extern void md_end (void);
+extern void pru_md_end (void);
+#define md_end pru_md_end
extern void md_begin (void);
#define tc_fix_adjustable(fixp) pru_fix_adjustable (fixp)
/* Called after all assembly has been done. */
void
-riscv_md_end (void)
+riscv_md_finish (void)
{
riscv_set_public_attributes ();
}
/* Adjust debug_line after relaxation. */
#define DWARF2_USE_FIXED_ADVANCE_PC 1
-#define md_end riscv_md_end
+#define md_finish riscv_md_finish
#define CONVERT_SYMBOLIC_ATTRIBUTE riscv_convert_symbolic_attribute
-extern void riscv_md_end (void);
+extern void riscv_md_finish (void);
extern int riscv_convert_symbolic_attribute (const char *);
/* Set mapping symbol states. */
/* Called after all assembly has been done. */
void
-s390_md_end (void)
+s390_md_finish (void)
{
if (s390_arch_size == 64)
bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_64);
#define md_operand(x)
-extern void s390_md_end (void);
-#define md_end() s390_md_end ()
+extern void s390_md_finish (void);
+#define md_finish() s390_md_finish ()
#define TARGET_USE_CFIPOP 1
/* Called after all assembly has been done. */
void
-sparc_md_end (void)
+sparc_md_finish (void)
{
unsigned long mach;
#ifndef TE_SOLARIS
#define md_operand(x)
-extern void sparc_md_end (void);
-#define md_end() sparc_md_end ()
+extern void sparc_md_finish (void);
+#define md_finish() sparc_md_finish ()
#define TC_PARSE_CONS_RETURN_TYPE const char *
#define TC_PARSE_CONS_RETURN_NONE NULL
}
void
-tic4x_end (void)
+tic4x_md_finish (void)
{
bfd_set_arch_mach (stdoutput, bfd_arch_tic4x,
IS_CPU_TIC4X (tic4x_cpu) ? bfd_mach_tic4x : bfd_mach_tic3x);
extern void tic4x_cleanup (void);
#define md_cleanup() tic4x_cleanup()
-extern void tic4x_end (void);
-#define md_end() tic4x_end()
+extern void tic4x_md_finish (void);
+#define md_finish() tic4x_md_finish()
tic6x_do_align (int n, char *fill, int len ATTRIBUTE_UNUSED, int max)
{
/* Given code alignments of 4, 8, 16 or 32 bytes, we try to handle
- them in the md_end pass by inserting NOPs in parallel with
+ them in the md_finish pass by inserting NOPs in parallel with
previous instructions. We only do this in sections containing
nothing but instructions. Code alignments of 1 or 2 bytes have
no effect in such sections (but we record them with
return ieee_md_atof (type, litP, sizeP, target_big_endian);
}
-/* Adjust the frags in SECTION (see tic6x_end). */
+/* Adjust the frags in SECTION (see tic6x_md_finish). */
static void
tic6x_adjust_section (bfd *abfd ATTRIBUTE_UNUSED, segT section,
relaxing. */
void
-tic6x_end (void)
+tic6x_md_finish (void)
{
/* Set object attributes at this point if not explicitly set. */
tic6x_set_attributes ();
}
/* No machine-dependent frags at this stage; all converted in
- tic6x_end. */
+ tic6x_md_finish. */
void
md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec ATTRIBUTE_UNUSED,
}
/* No machine-dependent frags at this stage; all converted in
- tic6x_end. */
+ tic6x_md_finish. */
int
md_estimate_size_before_relax (fragS *fragp ATTRIBUTE_UNUSED,
tic6x_convert_symbolic_attribute (name)
extern int tic6x_convert_symbolic_attribute (const char *);
-#define md_end() tic6x_end ();
-extern void tic6x_end (void);
+#define md_finish() tic6x_md_finish ();
+extern void tic6x_md_finish (void);
#define md_parse_name(name, exprP, mode, nextcharP) \
tic6x_parse_name (name, exprP, mode, nextcharP)
/* Create a v850 note section. */
void
-v850_md_end (void)
+v850_md_finish (void)
{
segT note_sec;
segT orig_seg = now_seg;
#define TC_FIX_TYPE void *
#define TC_INIT_FIX_DATA(fixP) (fixP)->tc_fix_data = NULL
-#define md_end v850_md_end
-extern void v850_md_end (void);
+#define md_finish v850_md_finish
+extern void v850_md_finish (void);
/* Some functions are only valid in the front end. This variable
allows us to assert that we haven't crossed over into the
back end. */
-static bool past_xtensa_end = false;
+static bool past_xtensa_md_finish = false;
/* Flags for properties of the last instruction in a segment. */
#define FLAG_IS_A0_WRITER 0x1
static bool
use_transform (void)
{
- /* After md_end, you should be checking frag by frag, rather
+ /* After md_finish, you should be checking frag by frag, rather
than state directives. */
- gas_assert (!past_xtensa_end);
+ gas_assert (!past_xtensa_md_finish);
return directive_state[directive_transform];
}
static bool
do_align_targets (void)
{
- /* Do not use this function after md_end; just look at align_targets
+ /* Do not use this function after md_finish; just look at align_targets
instead. There is no target-align directive, so alignment is either
enabled for all frags or not done at all. */
- gas_assert (!past_xtensa_end);
+ gas_assert (!past_xtensa_md_finish);
return align_targets && use_transform ();
}
fragP->tc_frag_data.is_no_density = true;
/* This function is called from subsegs_finish, which is called
- after xtensa_end, so we can't use "use_transform" or
+ after xtensa_md_finish, so we can't use "use_transform" or
"use_schedule" here. */
if (!directive_state[directive_transform])
fragP->tc_frag_data.is_no_transform = true;
int branches = 0;
xtensa_isa isa = xtensa_default_isa;
- gas_assert (!past_xtensa_end);
+ gas_assert (!past_xtensa_md_finish);
for (i = 0 ; i < vinsn->num_slots; i++)
{
}
\f
-/* xtensa_end and helper functions. */
+/* xtensa_md_finish and helper functions. */
static void xtensa_cleanup_align_frags (void);
static void xtensa_fix_target_frags (void);
static void xtensa_add_config_info (void);
void
-xtensa_end (void)
+xtensa_md_finish (void)
{
directive_balance ();
xtensa_flush_pending_output ();
- past_xtensa_end = true;
+ past_xtensa_md_finish = true;
xtensa_move_literals ();
{
if (only_if_needed)
{
- if (past_xtensa_end || !use_transform() ||
+ if (past_xtensa_md_finish || !use_transform() ||
frag_now->tc_frag_data.is_no_transform)
{
return;
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);
#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")
}
void
-z80_md_end (void)
+z80_md_finish (void)
{
int mach_type;
(as_fatal (_("estimate_size_before_relax called")), 1)
/* Define some functions to be called by generic code. */
-#define md_end z80_md_end
+#define md_finish z80_md_finish
#define md_start_line_hook() { if (z80_start_line_hook ()) continue; }
#define TC_CONS_FIX_NEW(f,w,s,e,r) z80_cons_fix_new ((f), (w), (s), (e))
-extern void z80_md_end (void);
+extern void z80_md_finish (void);
extern int z80_start_line_hook (void);
extern void z80_cons_fix_new (fragS *, int, int, expressionS *);
if (!keep_it && filename)
unlink_if_ordinary (filename);
+#ifdef md_end
+ md_end ();
+#endif
macro_end ();
read_end ();
symbol_end ();