* tc.h (md_end): Don't declare it.
* config/tc-*.[ch] (md_end): Deleted, in cases where it doesn't do anything.
* config/tc-vax.c (vip_end): Deleted null function.
* config/tc-mips.c (md_mips_end): Renamed from md_end.
* config/tc-mips.h (md_mips_end): Declare.
(md_end): New macro, calls md_mips_end.
* write.c (write_object_file): Don't close output file.
* as.c (main): Close output file (if needed) after calling listing_print, which
should be after calling write_object_file, which sets the frag addresses.
define_some_regs ();
}
-void
-md_end ()
-{
-}
-
/* Assemble a single instruction. Its label has already been handled
by the generic front end. We just parse opcode and operands, and
produce the bytes of data and relocation. */
printf ("call to tc_headers_hook \n");
}
-void
-DEFUN_VOID (md_end)
-{
-}
-
/* Various routines to kill one day */
/* Equal to MAX_PRECISION in atof-ieee.c */
#define MAX_LITTLENUMS 6
/* Holds the last field selector. */
static int hppa_field_selector;
+/* A dummy bfd symbol so that all relocations have symbols of some kind. */
+static asymbol *dummy_symbol;
+
/* Nonzero if errors are to be printed. */
static int print_errors = 1;
/* SOM will change text_section. To make sure we never put
anything into the old one switch to the new one now. */
subseg_set (text_section, 0);
-}
-
-/* Called at the end of assembling a source file. Nothing to do
- at this point on the PA. */
-void
-md_end ()
-{
+ dummy_symbol = symbol_find_or_make ("L$dummy");
+ dummy_symbol->section = text_section;
}
/* Assemble a single instruction storing it into a frag. */
case R_S_MODE:
case R_D_MODE:
case R_R_MODE:
+ case R_EXIT:
+ case R_FSEL:
+ case R_LSEL:
+ case R_RSEL:
/* There is no symbol or addend associated with these fixups. */
- relocs[i]->sym_ptr_ptr = 0;
+ relocs[i]->sym_ptr_ptr = dummy_symbol;
relocs[i]->addend = 0;
break;
const relax_typeS md_relax_table[] =
{0};
-void
-md_end ()
-{
-}
-
#if 0
/* As far as I can tell, this routine is never called. What is it
#define LOCAL_LABELS_FB
-#ifdef BFD_ASSEMBLER
-
#define TARGET_ARCH bfd_arch_sparc
#ifdef OBJ_AOUT
#define TARGET_FORMAT "a.out-sunos-big"
#define TARGET_FORMAT "elf64-sparc" /* v9 */
#define ENV64 /* v9 */
#endif /* sparcv9 */
-#define LOCAL_LABEL(name) ((name)[0] == '.')
+#define LOCAL_LABEL(name) ((name)[0] == '.' || !strncmp ((name), "_.L_", 4))
#endif
+#define WORKING_DOT_WORD
-#else
-
-#ifdef OBJ_BOUT
-#define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE ((0x103 << 16) | BMAGIC) /* Magic number for header */
-#else
-#ifdef OBJ_AOUT
-#define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE ((0x103 << 16) | OMAGIC) /* Magic number for header */
-#endif /* OBJ_AOUT */
-#endif /* OBJ_BOUT */
-
-#define AOUT_MACHTYPE 3
-
-#define NEED_FX_R_TYPE
-
-#define tc_headers_hook(a) {;} /* don't need it. */
-#define tc_crawl_symbol_chain(a) {;} /* don't need it. */
-
-#define TC_CONS_RELOC RELOC_32
-
-#endif /* BFD_ASSEMBLER */
-
-#ifndef BFD_ASSEMBLER
-#define md_convert_frag(h,f) {as_fatal ("sparc convert_frag\n");}
-#else
#define md_convert_frag(b,s,f) {as_fatal ("sparc convert_frag\n");}
-#endif
-
+#define md_create_long_jump(p,f,t,fr,s) as_fatal("sparc_create_long_jump")
+#define md_create_short_jump(p,f,t,fr,s) as_fatal("sparc_create_short_jump")
+#define md_estimate_size_before_relax(f,s) \
+ (as_fatal("estimate_size_before_relax called"),1)
void tc_aout_pre_write_hook ();
#define LISTING_HEADER "SPARC GAS "
if (errorval)
as_fatal (errorval);
}
-
-void
-md_end ()
-{
-}
\f
int
md_parse_option (argP, cntP, vecP)
fixp->fx_offset += S_GET_VALUE (sym);
if (sym->sy_frag)
fixp->fx_offset += sym->sy_frag->fr_address;
- if (symseginfo->sym)
- fixp->fx_addsy = symseginfo->sym;
- else
- {
- fixp->fx_addsy = symbol_find (symsec->name);
- if (!fixp->fx_addsy)
- {
- fixp->fx_addsy = symbol_make (symsec->name);
- fixp->fx_addsy->bsym = symsec->symbol;
- }
- symseginfo->sym = fixp->fx_addsy;
- }
+ fixp->fx_addsy = section_symbol (symsec);
fixp->fx_addsy->sy_used_in_reloc = 1;
}
/* Write the data to the file */
output_file_append (the_object_file, object_file_size, out_file_name);
#endif
-
- output_file_close (out_file_name);
} /* non vms output */
#else /* VMS */
/*
bfd_map_over_sections (stdoutput, write_relocs, (char *) 0);
bfd_map_over_sections (stdoutput, write_contents, (char *) 0);
-
- output_file_close (out_file_name);
#endif /* BFD_ASSEMBLER */
}
#endif /* ! BFD */