From 034988c662d7ef65467b4c93421888d53b1a0e1a Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 26 Feb 1997 04:33:08 +0000 Subject: [PATCH] Based on patches from Robert Lipe : * configure.in: Add i386coff and i386elf to emulation list. * configure: Rebuild. * as.c (i386coff, i386elf): Declare. * obj.h (coff_format_ops): Declare. * config/obj-coff.c (OBJ_HEADER): Define. (coff_obj_symbol_new_hook): Rename from obj_symbol_new_hook. (coff_obj_read_begin_hook): Rename from obj_read_begin_hook. (obj_pseudo_table): Add "version". (coff_pop_insert): New static function. (coff_sec_sym_ok_for_reloc): New static function. (no_func): New static function. (coff_format_ops): New variable. * config/obj-coff.h (coff_obj_symbol_new_hook): Declare. (obj_symbol_new_hook): Define. (coff_obj_read_begin_hook): Declare. (obj_read_begin_hook): Define. * config/tc-i386.h (i386_target_format): Declare. * config/tc-i386.c: Check OBJ_MAYBE_ELF as well as OBJ_ELF; check OUTPUT_FLAVOR when appropriate. (i386_target_format): New function. * Makefile.in (obj-coff.o): New target. (e-i386coff.o, e-i386elf.o): New targets. --- gas/ChangeLog | 24 ++++++++++++++++++++++++ gas/Makefile.in | 15 ++++++++++----- gas/config/.Sanitize | 2 ++ gas/config/e-i386coff.c | 17 +++++++++++++++++ gas/config/e-i386elf.c | 17 +++++++++++++++++ 5 files changed, 70 insertions(+), 5 deletions(-) create mode 100644 gas/config/e-i386coff.c create mode 100644 gas/config/e-i386elf.c diff --git a/gas/ChangeLog b/gas/ChangeLog index 004f81a7fb6..54d2357261d 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -7,6 +7,30 @@ Tue Feb 25 22:02:23 1997 Philippe De Muyter Tue Feb 25 13:17:27 1997 Ian Lance Taylor + Based on patches from Robert Lipe : + * configure.in: Add i386coff and i386elf to emulation list. + * configure: Rebuild. + * as.c (i386coff, i386elf): Declare. + * obj.h (coff_format_ops): Declare. + * config/obj-coff.c (OBJ_HEADER): Define. + (coff_obj_symbol_new_hook): Rename from obj_symbol_new_hook. + (coff_obj_read_begin_hook): Rename from obj_read_begin_hook. + (obj_pseudo_table): Add "version". + (coff_pop_insert): New static function. + (coff_sec_sym_ok_for_reloc): New static function. + (no_func): New static function. + (coff_format_ops): New variable. + * config/obj-coff.h (coff_obj_symbol_new_hook): Declare. + (obj_symbol_new_hook): Define. + (coff_obj_read_begin_hook): Declare. + (obj_read_begin_hook): Define. + * config/tc-i386.h (i386_target_format): Declare. + * config/tc-i386.c: Check OBJ_MAYBE_ELF as well as OBJ_ELF; check + OUTPUT_FLAVOR when appropriate. + (i386_target_format): New function. + * Makefile.in (obj-coff.o): New target. + (e-i386coff.o, e-i386elf.o): New targets. + From Stephen Williams : * config/tc-i960.h (TC_SYMFIELD_TYPE): Define if OBJ_COFF. (_tc_get_bal_of_call): Don't declare. diff --git a/gas/Makefile.in b/gas/Makefile.in index fd91454fb9e..ec592c2bb6d 100644 --- a/gas/Makefile.in +++ b/gas/Makefile.in @@ -270,7 +270,7 @@ as.new: $(OBJS) $(LIBDEPS) $(OBJS): config.h as.h targ-env.h obj-format.h targ-cpu.h flonum.h expr.h \ struc-symbol.h write.h frags.h hash.h read.h symbols.h tc.h obj.h \ - listing.h bignum.h $(IT_HDRS) $(srcdir)/../include/libiberty.h + listing.h bignum.h $(srcdir)/../include/libiberty.h gasp.new: $(GASPOBJS) ../libiberty/libiberty.a $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o gasp.new $(GASPOBJS) ../libiberty/libiberty.a $(LOADLIBES) @@ -357,7 +357,7 @@ TARG_CPU_DEP_m68k = $(srcdir)/../include/opcode/m68k.h \ $(srcdir)/config/m68k-parse.h subsegs.h TARG_CPU_DEP_m88k = $(srcdir)/config/m88k-opcode.h subsegs.h TARG_CPU_DEP_mips = $(srcdir)/../include/opcode/mips.h subsegs.h \ - $(srcdir)/config/itbl-mips.h + $(srcdir)/config/itbl-mips.h $(srcdir)/itbl-ops.h TARG_CPU_DEP_ns32k = TARG_CPU_DEP_ppc = subsegs.h TARG_CPU_DEP_sh = $(srcdir)/../opcodes/sh-opc.h subsegs.h @@ -406,11 +406,17 @@ obj-elf.o : $(srcdir)/config/obj-elf.c $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-elf.c obj-ecoff.o : $(srcdir)/config/obj-ecoff.c $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-ecoff.c +obj-coff.o: $(srcdir)/config/obj-coff.c + $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/obj-coff.c e-mipself.o : $(srcdir)/config/e-mipself.c $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipself.c e-mipsecoff.o : $(srcdir)/config/e-mipsecoff.c $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-mipsecoff.c +e-i386coff.o: $(srcdir)/config/e-i386coff.c + $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-i386coff.c +e-i386elf.o: $(srcdir)/config/e-i386elf.c + $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/config/e-i386elf.c # The m68k operand parser. @@ -431,7 +437,7 @@ itbl-lex.c: $(srcdir)/itbl-lex.l $(LEX) $(LEXFLAGS) $(srcdir)/itbl-lex.l mv -f lex.yy.c itbl-lex.c -itbl-lex.o: itbl-lex.c +itbl-lex.o: itbl-lex.c itbl-parse.h $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) itbl-lex.c itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y @@ -442,8 +448,7 @@ itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) itbl-parse.c -itbl-ops.o: $(srcdir)/itbl-ops.c \ - $(srcdir)/itbl-ops.h itbl-parse.h +itbl-ops.o: $(srcdir)/itbl-ops.c $(srcdir)/itbl-ops.h itbl-parse.h $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(srcdir)/itbl-ops.c # stand-alone itbl assembler & disassembler diff --git a/gas/config/.Sanitize b/gas/config/.Sanitize index cdacd80c656..a9adfdda60f 100644 --- a/gas/config/.Sanitize +++ b/gas/config/.Sanitize @@ -70,6 +70,8 @@ atof-ieee.c atof-tahoe.c atof-vax.c go32.cfg +e-i386coff.c +e-i386elf.c e-mipsecoff.c e-mipself.c i386coff.mt diff --git a/gas/config/e-i386coff.c b/gas/config/e-i386coff.c new file mode 100644 index 00000000000..afed72886ac --- /dev/null +++ b/gas/config/e-i386coff.c @@ -0,0 +1,17 @@ +#include "as.h" +#include "emul.h" + +static const char * +i386coff_bfd_name () +{ + abort (); + return NULL; +} + +#define emul_bfd_name i386coff_bfd_name +#define emul_format &coff_format_ops + +#define emul_name "i386coff" +#define emul_struct_name i386coff +#define emul_default_endian 0 +#include "emul-target.h" diff --git a/gas/config/e-i386elf.c b/gas/config/e-i386elf.c new file mode 100644 index 00000000000..a16701e811e --- /dev/null +++ b/gas/config/e-i386elf.c @@ -0,0 +1,17 @@ +#include "as.h" +#include "emul.h" + +static const char * +i386elf_bfd_name () +{ + abort (); + return NULL; +} + +#define emul_bfd_name i386elf_bfd_name +#define emul_format &elf_format_ops + +#define emul_name "i386elf" +#define emul_struct_name i386elf +#define emul_default_endian 0 +#include "emul-target.h" -- 2.30.2