aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/.Sanitize2
-rw-r--r--bfd/ChangeLog15
-rw-r--r--bfd/Makefile.in217
-rwxr-xr-xbfd/config.bfd29
-rw-r--r--bfd/targets.c8
5 files changed, 167 insertions, 104 deletions
diff --git a/bfd/.Sanitize b/bfd/.Sanitize
index 7366fd8..5e4ae30 100644
--- a/bfd/.Sanitize
+++ b/bfd/.Sanitize
@@ -155,6 +155,7 @@ elflink.c
elflink.h
filemode.c
format.c
+freebsd.h
gen-aout.c
genlink.h
hash.c
@@ -168,6 +169,7 @@ hpux-core.c
i386aout.c
i386bsd.c
i386dynix.c
+i386freebsd.c
i386linux.c
i386netbsd.c
i386lynx.c
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index dd4cb4e..c7a7bd7 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,18 @@
+Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
+
+ * config.bfd (i[345]86-*-freebsd*): Add target.
+ * configure.in (i386freebsd_vec): Add vec.
+ * configure: Regenerate.
+ * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
+ (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
+ Rebuild dependencies..
+ * freebsd.h: New file.
+ * i386freebsd.c: New file.
+ * targets.c (i386freebsd_vec): Declare.
+ (bfd_target_vector): Add i386freebsd_vec.
+ * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
+ * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
+
Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
* ieee.c (ieee_slurp_debug): New static function.
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 5a69c96..46a7095 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -86,7 +86,13 @@ BFD_LIBS = \
archive.o archures.o bfd.o cache.o coffgen.o corefile.o \
format.o init.o libbfd.o opncls.o reloc.o \
section.o syms.o targets.o hash.o linker.o \
- elf.o srec.o binary.o tekhex.o
+ elf.o srec.o binary.o tekhex.o ihex.o
+
+BFD_LIBS_CFILES = \
+ archive.c archures.c bfd.c cache.c coffgen.c corefile.c \
+ format.c init.c libbfd.c opncls.c reloc.c \
+ section.c syms.c targets.c hash.c linker.c \
+ elf.c srec.c binary.c tekhex.c ihex.c
# This list is alphabetized to make it easier to keep in sync
# with the decls and initializer in archures.c.
@@ -119,6 +125,29 @@ ALL_MACHINES = \
cpu-w65.o \
cpu-z8k.o
+ALL_MACHINES_CFILES = \
+ cpu-a29k.c \
+ cpu-alpha.c \
+ cpu-arm.c \
+ cpu-h8300.c \
+ cpu-h8500.c \
+ cpu-hppa.c \
+ cpu-i386.c \
+ cpu-i860.c \
+ cpu-i960.c \
+ cpu-m68k.c \
+ cpu-m88k.c \
+ cpu-mips.c \
+ cpu-ns32k.c \
+ cpu-powerpc.c \
+ cpu-rs6000.c \
+ cpu-sh.c \
+ cpu-sparc.c \
+ cpu-vax.c \
+ cpu-we32k.c \
+ cpu-w65.c \
+ cpu-z8k.c
+
# The .o files needed by all of the 32 bit vectors that are configured into
# target_vector in targets.c if configured with --enable-targets=all.
BFD32_BACKENDS = \
@@ -174,6 +203,7 @@ BFD32_BACKENDS = \
som.o \
i386aout.o \
i386bsd.o \
+ i386freebsd.o \
i386linux.o \
i386lynx.o \
i386msdos.o \
@@ -209,86 +239,7 @@ BFD32_BACKENDS = \
versados.o \
xcofflink.o
-# The .o files needed by all of the 64 bit vectors that are configured into
-# target_vector in targets.c if configured with --enable-targets=all
-# and --enable-64-bit-bfd.
-BFD64_BACKENDS = \
- aout64.o \
- coff-alpha.o \
- demo64.o \
- elf64-gen.o \
- elf64-sparc.o \
- elf64.o \
- nlm32-alpha.o \
- nlm64.o
-
-OPTIONAL_BACKENDS = \
- aix386-core.o \
- hpux-core.o \
- irix-core.o \
- lynx-core.o \
- osf-core.o \
- trad-core.o \
- cisco-core.o
-
-# These are defined by configure.in:
-WORDSIZE = @wordsize@
-ALL_BACKENDS = @all_backends@
-BFD_BACKENDS = @bfd_backends@
-BFD_MACHINES = @bfd_machines@
-TDEFAULTS = @tdefaults@
-
-all:
-
-FLAGS_TO_PASS = \
- "prefix=$(prefix)" \
- "exec_prefix=$(exec_prefix)" \
- "against=$(against)" \
- "AR=$(AR)" \
- "AR_FLAGS=$(AR_FLAGS)" \
- "CC=$(CC)" \
- "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
- "CFLAGS=$(CFLAGS)" \
- "RANLIB=$(RANLIB)" \
- "MAKEINFO=$(MAKEINFO)" \
- "INSTALL=$(INSTALL)" \
- "INSTALL_DATA=$(INSTALL_DATA)" \
- "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
-
-ALL_CFLAGS=@HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) $(CFLAGS)
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
-
-# C source files that correspond to .o's.
-CFILES = \
- $(bfd_libs_here) \
- archive.c archures.c bfd.c cache.c coffgen.c corefile.c \
- format.c init.c libbfd.c opncls.c reloc.c \
- section.c syms.c targets.c hash.c linker.c \
- elf.c srec.c binary.c tekhex.c \
- $(all_machines_here) \
- cpu-a29k.c \
- cpu-alpha.c \
- cpu-arm.c \
- cpu-h8300.c \
- cpu-h8500.c \
- cpu-hppa.c \
- cpu-i386.c \
- cpu-i860.c \
- cpu-i960.c \
- cpu-m68k.c \
- cpu-m88k.c \
- cpu-mips.c \
- cpu-ns32k.c \
- cpu-powerpc.c \
- cpu-rs6000.c \
- cpu-sh.c \
- cpu-sparc.c \
- cpu-vax.c \
- cpu-we32k.c \
- cpu-w65.c \
- cpu-z8k.c \
- $(bfd32_backends_here) \
+BFD32_BACKENDS_CFILES = \
aout-adobe.c \
aout-ns32k.c \
aout0.c \
@@ -335,6 +286,7 @@ CFILES = \
som.c \
i386aout.c \
i386bsd.c \
+ i386freebsd.c \
i386linux.c \
i386lynx.c \
i386msdos.c \
@@ -368,8 +320,22 @@ CFILES = \
sunos.c \
tekhex.c \
versados.c \
- xcofflink.c \
- $(bfd64_backends) \
+ xcofflink.c
+
+# The .o files needed by all of the 64 bit vectors that are configured into
+# target_vector in targets.c if configured with --enable-targets=all
+# and --enable-64-bit-bfd.
+BFD64_BACKENDS = \
+ aout64.o \
+ coff-alpha.o \
+ demo64.o \
+ elf64-gen.o \
+ elf64-sparc.o \
+ elf64.o \
+ nlm32-alpha.o \
+ nlm64.o
+
+BFD64_BACKENDS_CFILES = \
aout64.c \
coff-alpha.c \
demo64.c \
@@ -377,12 +343,67 @@ CFILES = \
elf64-sparc.c \
elf64.c \
nlm32-alpha.c \
- nlm64.c \
- $(core_files_here) \
- trad-core.c cisco-core.c \
- aix386-core.c hpux-core.c \
- irix-core.c lynx-core.c osf-core.c \
- $(configs_not_included_in_all_targets_option_here) \
+ nlm64.c
+
+OPTIONAL_BACKENDS = \
+ aix386-core.o \
+ hpux-core.o \
+ irix-core.o \
+ lynx-core.o \
+ osf-core.o \
+ trad-core.o \
+ cisco-core.o
+
+OPTIONAL_BACKENDS_CFILES = \
+ aix386-core.c \
+ hpux-core.c \
+ irix-core.c \
+ lynx-core.c \
+ osf-core.c \
+ trad-core.c \
+ cisco-core.c
+
+# These are defined by configure.in:
+WORDSIZE = @wordsize@
+ALL_BACKENDS = @all_backends@
+BFD_BACKENDS = @bfd_backends@
+BFD_MACHINES = @bfd_machines@
+TDEFAULTS = @tdefaults@
+
+all:
+
+FLAGS_TO_PASS = \
+ "prefix=$(prefix)" \
+ "exec_prefix=$(exec_prefix)" \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "CC=$(CC)" \
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS=$(CFLAGS)" \
+ "RANLIB=$(RANLIB)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ "INSTALL=$(INSTALL)" \
+ "INSTALL_DATA=$(INSTALL_DATA)" \
+ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
+
+ALL_CFLAGS=@HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) $(CFLAGS)
+.c.o:
+ $(CC) -c $(ALL_CFLAGS) $<
+
+bfd_libs_here =
+all_machines_here =
+bfd32_backends_here =
+core_files_here =
+configs_not_included_in_all_targets_option_here =
+
+# C source files that correspond to .o's.
+CFILES = \
+ $(BFD_LIBS_CFILES) \
+ $(ALL_MACHINES_CFILES) \
+ $(BFD32_BACKENDS_CFILES) \
+ $(BFD64_BACKENDS_CFILES) \
+ $(OPTIONAL_BACKENDS_CFILES) \
i386dynix.c hp300bsd.c
HFILES = aout-target.h aoutf1.h aoutx.h coffcode.h \
@@ -595,11 +616,16 @@ config.status: configure configure.host config.bfd
sed -f dep.sed <.dep1 >.dep
# This rule really wants a mkdep that runs "gcc -MM".
+# The NetBSD mkdep overwrites any existing file contents, and doesn't insert
+# the "DO NOT DELETE" line.
+# Other mkdep versions require a file that already exists, and do insert it.
+# Hence the weirdness....
.dep1: $(CFILES)
rm -f .dep2 .dep2a
echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > .dep2
+ echo > .dep2a
$(DEP) -f .dep2a $(ALL_CFLAGS) $?
- cat .dep2a >> .dep2
+ sed -e '/DO NOT DELETE/d' -e '/^$$/d' < .dep2a >> .dep2
rm -f .dep2a
$(srcdir)/../move-if-change .dep2 .dep1
@@ -671,7 +697,6 @@ end-sanitize-arc:
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
archive.o: archive.c $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h
archures.o: archures.c
bfd.o: bfd.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
@@ -697,6 +722,7 @@ elf.o: elf.c $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
srec.o: srec.c $(INCDIR)/libiberty.h
binary.o: binary.c
tekhex.o: tekhex.c $(INCDIR)/libiberty.h
+ihex.o: ihex.c $(INCDIR)/libiberty.h
cpu-a29k.o: cpu-a29k.c
cpu-alpha.o: cpu-alpha.c
cpu-arm.o: cpu-arm.c
@@ -843,6 +869,9 @@ i386aout.o: i386aout.c libaout.h $(INCDIR)/bfdlink.h \
i386bsd.o: i386bsd.c libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+i386freebsd.o: i386freebsd.c freebsd.h libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
i386linux.o: i386linux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \
$(INCDIR)/bfdlink.h aout-target.h
@@ -952,14 +981,15 @@ nlm32-alpha.o: nlm32-alpha.c $(INCDIR)/nlm/alpha-ext.h \
$(INCDIR)/nlm/external.h nlmswap.h nlm-target.h
nlm64.o: nlm64.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \
$(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
-trad-core.o: trad-core.c libaout.h $(INCDIR)/bfdlink.h
-cisco-core.o: cisco-core.c
aix386-core.o: aix386-core.c $(INCDIR)/coff/i386.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h
hpux-core.o: hpux-core.c
irix-core.o: irix-core.c
lynx-core.o: lynx-core.c
osf-core.o: osf-core.c
+trad-core.o: trad-core.c libaout.h $(INCDIR)/bfdlink.h \
+ hosts/i386bsd.h
+cisco-core.o: cisco-core.c
i386dynix.o: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \
$(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
@@ -967,5 +997,4 @@ i386dynix.o: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \
hp300bsd.o: hp300bsd.c libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/bfd/config.bfd b/bfd/config.bfd
index ad91081..d86c49c 100755
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -102,6 +102,7 @@ case "${targ}" in
;;
sh-*-*)
+ targ_defvec=shcoff_vec
targ_selvecs="shcoff_vec shlcoff_vec"
targ_underscore=yes
;;
@@ -140,10 +141,15 @@ case "${targ}" in
targ_defvec=i386dynix_vec
targ_underscore=yes
;;
- i[345]86-*-bsd* | i[345]86-*-freebsd*)
+ i[345]86-*-bsd*)
targ_defvec=i386bsd_vec
targ_underscore=yes
;;
+ i[345]86-*-freebsd*)
+ targ_defvec=i386freebsd_vec
+ targ_selvecs=i386bsd_vec
+ targ_underscore=yes
+ ;;
i[345]86-*-netbsd*)
targ_defvec=i386netbsd_vec
targ_selvecs=i386bsd_vec
@@ -200,7 +206,10 @@ case "${targ}" in
targ_defvec=i386aout_vec
;;
- i860-*-sysv4*)
+ i860-*-mach3* | i860-*-osf1* | i860-*-coff*)
+ targ_defvec=i860coff_vec
+ ;;
+ i860-*-sysv4* | i860-*-elf*)
targ_defvec=bfd_elf32_i860_vec
;;
@@ -239,7 +248,7 @@ case "${targ}" in
targ_selvecs=cisco_core_vec
targ_underscore=yes
;;
- m68*-*-elf* | m68*-*-sysv4* | m68*-cbm-*)
+ m68*-*-elf* | m68*-*-sysv4*)
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs=m68kcoff_vec
;;
@@ -275,6 +284,10 @@ case "${targ}" in
targ_selvecs="m68kcoff_vec tekhex_vec"
targ_underscore=yes
;;
+ m68*-cbm-*)
+ targ_defvec=bfd_elf32_m68k_vec
+ targ_selvecs=m68kcoff_vec
+ ;;
m88*-harris-cxux* | m88*-*-dgux* | m88*-*-sysv4*)
targ_defvec=bfd_elf32_m88k_vec
@@ -399,18 +412,18 @@ case "${targ}" in
targ_defvec=sparcnetbsd_vec
targ_underscore=yes
;;
- sparc-*-solaris2* | sparc-*-sysv4*)
+ sparc-*-elf* | sparc-*-sysv4* | sparc-*-solaris2*)
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs=sunos_big_vec
;;
- sparc64-*-aout*)
- targ_defvec=sunos_big_vec
- targ_underscore=yes
- ;;
sparc64-*-elf* | sparc64-*-sysv4* | sparc64-*-solaris2*)
targ_defvec=bfd_elf64_sparc_vec
targ_selvecs=bfd_elf32_sparc_vec
;;
+ sparc64-*-aout*)
+ targ_defvec=sunos_big_vec
+ targ_underscore=yes
+ ;;
sparc-*-netware*)
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs="nlm32_sparc_vec sunos_big_vec"
diff --git a/bfd/targets.c b/bfd/targets.c
index c0e1543..32f27f3 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -152,6 +152,8 @@ DESCRIPTION
. bfd_target_msdos_flavour
.};
.
+.enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
+.
.{* Forward declaration. *}
.typedef struct bfd_link_info _bfd_link_info;
.
@@ -169,11 +171,11 @@ of a file.
The order of bytes within the data area of a file.
-. boolean byteorder_big_p;
+. enum bfd_endian byteorder;
The order of bytes within the header parts of a file.
-. boolean header_byteorder_big_p;
+. enum bfd_endian header_byteorder;
A mask of all the flags which an executable may have set -
from the set <<NO_FLAGS>>, <<HAS_RELOC>>, ...<<D_PAGED>>.
@@ -507,6 +509,7 @@ extern const bfd_target som_vec;
extern const bfd_target i386aout_vec;
extern const bfd_target i386bsd_vec;
extern const bfd_target i386dynix_vec;
+extern const bfd_target i386freebsd_vec;
extern const bfd_target i386os9k_vec;
extern const bfd_target i386coff_vec;
extern const bfd_target bfd_powerpc_pe_vec;
@@ -664,6 +667,7 @@ const bfd_target * const bfd_target_vector[] = {
&i386aout_vec,
&i386bsd_vec,
&i386coff_vec,
+ &i386freebsd_vec,
&i860coff_vec,
&bfd_powerpc_pe_vec,
&bfd_powerpcle_pe_vec,