Added 386 support!

This commit is contained in:
Steve Chamberlain
1991-05-25 01:51:10 +00:00
parent ebec46845c
commit 20fdc627fa
3 changed files with 140 additions and 114 deletions

View File

@ -38,14 +38,14 @@ BFD_LIBS = libbfd.o opncls.o bfd.o archive.o targets.o cache.o \
archures.o
BFD_BACKENDS = oasys.o ieee.o srec.o aout64.o aout32.o sunos.o icoff.o demo64.o \
m68kcoff.o m88k-bcs.o coffswap.o ecoff.o newsos3.o # trad-core.o bout.o
m68kcoff.o i386coff.o m88k-bcs.o coffswap.o ecoff.o newsos3.o # trad-core.o bout.o
BFD_H=$(INCDIR)/bfd.h
SYSDEP_H=$(INCDIR)/sysdep.h
# C source files that correspond to .o's.
CFILES = libbfd.c opncls.c bfd.c archive.c targets.c cache.c archures.c \
aout64.c aout32.c sunos.c demo64.c icoff.c srec.c oasys.c ieee.c m68kcoff.c \
i386coff.c aout64.c aout32.c sunos.c demo64.c icoff.c srec.c oasys.c ieee.c m68kcoff.c \
m88k-bcs.c coffswap.c ecoff.c trad-core.c newsos3.c #bout.c
STAGESTUFF = $(TARGETLIB) $(OFILES)
@ -171,7 +171,7 @@ Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
./configure +norecurse \
+destdir=$(destdir) \
`if [ "$(srcdir)" != "." ] ; then echo +f; fi` \
$(host) +target=$(target);) ; make dep
$(host) +target=$(target);)
dep: $(CFILES)
mkdep $(CFLAGS) $?

View File

@ -417,6 +417,9 @@ DEFUN(coff_new_section_hook,(abfd_ignore, section_ignore),
#endif
#if M68
section_ignore->alignment_power = 3;
#endif
#if I386
section_ignore->alignment_power = 2;
#endif
return true;
}
@ -545,6 +548,12 @@ DEFUN(coff_real_object_p,(abfd, nscns, internal_f, internal_a),
/* Determine the machine architecture and type. */
abfd->obj_machine = 0;
switch (internal_f->f_magic) {
#ifdef I386MAGIC
case I386MAGIC:
abfd->obj_arch = bfd_arch_i386;
abfd->obj_machine = 0;
break;
#endif
#ifdef MIPS
case MIPS_MAGIC_1:
case MIPS_MAGIC_2:
@ -1343,6 +1352,11 @@ unsigned *magicp,
return true;
break;
#endif
#ifdef I386MAGIC
case bfd_arch_i386:
*magicp = I386MAGIC;
return true;
#endif
#ifdef MC68MAGIC
case bfd_arch_m68k:
*magicp = MC68MAGIC;
@ -2399,6 +2413,9 @@ DEFUN(coff_slurp_reloc_table,(abfd, asect, symbols),
cache_ptr->section = (asection *) NULL;
#if I386
cache_ptr->howto = howto_table + dst.r_type;
#endif
#if I960
cache_ptr->howto = howto_table + dst.r_type;
#endif
@ -2510,10 +2527,11 @@ DEFUN(coff_find_nearest_line,(abfd,
file didn't have a C_FILE. xoxorich.
*/
/*
#ifdef WEREBEINGPEDANTIC
return false;
#endif
*/
for (i = 0; i < cof->raw_syment_count; i++) {
if (p->n_sclass == C_FILE) {
/* File name is embeded in auxent */

View File

@ -39,6 +39,7 @@ extern bfd_target ieee_vec;
extern bfd_target oasys_vec;
extern bfd_target m88k_bcs_vec;
extern bfd_target m68kcoff_vec;
extern bfd_target i386coff_vec;
#ifdef GNU960
#define ICOFF_LITTLE_VEC icoff_little_vec
@ -61,6 +62,7 @@ extern bfd_target m68kcoff_vec;
#define M88K_BCS_VEC m88k_bcs_vec
#define SREC_VEC srec_vec
#define M68KCOFF_VEC m68kcoff_vec
#define I386COFF_VEC i386coff_vec
#endif
bfd_target *target_vector[] = {
@ -68,6 +70,10 @@ bfd_target *target_vector[] = {
&DEFAULT_VECTOR,
#endif /* DEFAULT_VECTOR */
#ifdef I386COFF_VEC
&I386COFF_VEC,
#endif /* I386COFF_VEC */
#ifdef ECOFF_LITTLE_VEC
&ECOFF_LITTLE_VEC,
#endif
@ -75,9 +81,6 @@ bfd_target *target_vector[] = {
#ifdef ECOFF_BIG_VEC
&ECOFF_BIG_VEC,
#endif
#ifdef M68KCOFF_VEC
&M68KCOFF_VEC,
#endif
#ifdef IEEE_VEC
&IEEE_VEC,
#endif /* IEEE_VEC */
@ -121,5 +124,10 @@ bfd_target *target_vector[] = {
&B_OUT_VEC_BIG_HOST,
#endif /* B_OUT_VEC_BIG_HOST */
#ifdef M68KCOFF_VEC
&M68KCOFF_VEC,
#endif /* M68KCOFF_VEC */
NULL, /* end of list marker */
};