Commit c65c21e1 authored by Alan Modra's avatar Alan Modra

various i386-aout and i386-coff target removal

Also tidies some other aout leftovers in binutils-common.exp.

bfd/
	* Makefile.am: Remove support for assorted i386 aout and coff targets.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* doc/bfdint.texi: Likewise.
	* targets.c: Likewise.
	* freebsd.h: Delete.
	* i386dynix.c: Delete.
	* i386freebsd.c: Delete.
	* i386linux.c: Delete.
	* i386mach3.c: Delete.
	* i386netbsd.c: Delete.
	* i386os9k.c: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
binutils/
	* testsuite/lib/binutils-common.exp: Remove support for assorted
	aout targets.
gas/
	* Makefile.am: Remove support for assorted i386 aout and coff targets.
	* config/obj-elf.c: Likewise.
	* config/tc-i386.h: Likewise.
	* configure.ac: Likewise.
	* configure.tgt: Likewise.
	* config/te-dynix.h: Delete.
	* config/te-i386aix.h: Delete.
	* config/te-mach.h: Delete.
	* Makefile.in: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.
	* po/POTFILES.in: Regenerate.
include/
	* aout/dynix3.h: Delete.
ld/
	* Makefile.am: Remove support for assorted i386 aout and coff targets.
	* configure.tgt: Likewise.
	* testsuite/ld-discard/discard.exp: Likewise.
	* testsuite/ld-elf/binutils.exp: Likewise.
	* testsuite/ld-elf/tls.exp: Likewise.
	* testsuite/ld-elf/tls_common.exp: Likewise.
	* testsuite/ld-elfvers/vers.exp: Likewise.
	* testsuite/ld-elfvsb/elfvsb.exp: Likewise.
	* testsuite/ld-elfweak/elfweak.exp: Likewise.
	* testsuite/ld-gc/abi-note.d: Likewise.
	* testsuite/ld-gc/pr19167.d: Likewise.
	* testsuite/ld-gc/pr20022.d: Likewise.
	* testsuite/ld-gc/start.d: Likewise.
	* testsuite/ld-gc/stop.d: Likewise.
	* testsuite/ld-i386/i386.exp: Likewise.
	* testsuite/ld-ifunc/binutils.exp: Likewise.
	* testsuite/ld-ifunc/ifunc.exp: Likewise.
	* testsuite/ld-linkonce/linkonce.exp: Likewise.
	* testsuite/ld-plugin/lto.exp: Likewise.
	* testsuite/ld-scripts/empty-address-2a.d: Likewise.
	* testsuite/ld-scripts/empty-address-2b.d: Likewise.
	* testsuite/ld-scripts/phdrs2.exp: Likewise.
	* testsuite/ld-scripts/section-match-1.d: Likewise.
	* testsuite/ld-shared/shared.exp: Likewise.
	* testsuite/ld-size/size.exp: Likewise.
	* testsuite/ld-sparc/sparc.exp: Likewise.
	* emulparams/i386coff.sh: Delete.
	* emulparams/i386linux.sh: Delete.
	* emulparams/i386mach.sh: Delete.
	* emulparams/i386nbsd.sh: Delete.
	* emulparams/vsta.sh: Delete.
	* scripttempl/i386coff.sc: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
parent e2e4f0fd
2018-04-18 Alan Modra <amodra@gmail.com>
* Makefile.am: Remove support for assorted i386 aout and coff targets.
* config.bfd: Likewise.
* configure.ac: Likewise.
* doc/bfdint.texi: Likewise.
* targets.c: Likewise.
* freebsd.h: Delete.
* i386dynix.c: Delete.
* i386freebsd.c: Delete.
* i386linux.c: Delete.
* i386mach3.c: Delete.
* i386netbsd.c: Delete.
* i386os9k.c: Delete.
* Makefile.in: Regenerate.
* configure: Regenerate.
* po/SRC-POTFILES.in: Regenerate.
2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
Microblaze Target: PIC data text relative
......
......@@ -359,14 +359,8 @@ BFD32_BACKENDS = \
elfxx-tilegx.lo \
i386aout.lo \
i386bsd.lo \
i386dynix.lo \
i386freebsd.lo \
i386linux.lo \
i386lynx.lo \
i386mach3.lo \
i386msdos.lo \
i386netbsd.lo \
i386os9k.lo \
mach-o.lo \
mach-o-i386.lo \
mach-o-arm.lo \
......@@ -508,14 +502,8 @@ BFD32_BACKENDS_CFILES = \
elfxx-tilegx.c \
i386aout.c \
i386bsd.c \
i386dynix.c \
i386freebsd.c \
i386linux.c \
i386lynx.c \
i386mach3.c \
i386msdos.c \
i386netbsd.c \
i386os9k.c \
mach-o.c \
mach-o-i386.c \
mach-o-arm.c \
......@@ -700,7 +688,7 @@ SOURCE_HFILES = \
aout-target.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
elf-bfd.h elf-hppa.h elf-linux-core.h elf32-hppa.h \
elf64-hppa.h elfcode.h elfcore.h \
freebsd.h genlink.h go32stub.h \
genlink.h go32stub.h \
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
libpei.h libxcoff.h mach-o.h \
netbsd.h ns32k.h \
......
......@@ -693,14 +693,8 @@ BFD32_BACKENDS = \
elfxx-tilegx.lo \
i386aout.lo \
i386bsd.lo \
i386dynix.lo \
i386freebsd.lo \
i386linux.lo \
i386lynx.lo \
i386mach3.lo \
i386msdos.lo \
i386netbsd.lo \
i386os9k.lo \
mach-o.lo \
mach-o-i386.lo \
mach-o-arm.lo \
......@@ -842,14 +836,8 @@ BFD32_BACKENDS_CFILES = \
elfxx-tilegx.c \
i386aout.c \
i386bsd.c \
i386dynix.c \
i386freebsd.c \
i386linux.c \
i386lynx.c \
i386mach3.c \
i386msdos.c \
i386netbsd.c \
i386os9k.c \
mach-o.c \
mach-o-i386.c \
mach-o-arm.c \
......@@ -1035,7 +1023,7 @@ SOURCE_HFILES = \
aout-target.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
elf-bfd.h elf-hppa.h elf-linux-core.h elf32-hppa.h \
elf64-hppa.h elfcode.h elfcore.h \
freebsd.h genlink.h go32stub.h \
genlink.h go32stub.h \
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
libpei.h libxcoff.h mach-o.h \
netbsd.h ns32k.h \
......@@ -1432,14 +1420,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hpux-core.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386aout.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386bsd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386dynix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386freebsd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386linux.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386lynx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386mach3.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386msdos.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386netbsd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386os9k.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ihex.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/irix-core.Plo@am__quote@
......
......@@ -53,29 +53,11 @@ case $targ in
echo "*** Use or1k-*-elf or or1k-*-linux as the target instead" >&2
exit 1
;;
i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu | \
mips*-*-irix5* | mips*-*-irix6*)
# Not obsolete
;;
arm*-*-aout | \
arm*-*-coff | \
i[3-7]86-*-sco3.2v5*coff | \
i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | \
i[3-7]86-*-sco3.2v5* | \
i[3-7]86-*-dgux* | i[3-7]86-*-sysv5* | \
i[3-7]86-*-chorus* | \
i[3-7]86-*-sysv* | i[3-7]86-*-isc* | i[3-7]86-*-sco* | i[3-7]86-*-coff | \
i[3-7]86-*-aix* | \
i[3-7]86-sequent-bsd* | \
i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | \
i[3-7]86-*-freebsd[12] | \
i[3-7]86-*-netbsdaout* | i[3-7]86-*-netbsd* | \
i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3] | \
i[3-7]86-*-linux*aout* | \
i[3-7]86-*-mach* | i[3-7]86-*-osf1mk* | \
i[3-7]86-*-os9k | \
i[3-7]86-none-* | \
i[3-7]86-*-aout* | i[3-7]86*-*-vsta* | \
mips*-big-* | \
mips*-dec-* | mips*el-*-ecoff* | \
mips*-*-ecoff* | \
......@@ -94,7 +76,7 @@ case $targ in
esac
case $targ in
m68*-*-netbsdelf*)
*-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu)
# Not obsolete
;;
*-adobe-* | \
......@@ -111,6 +93,23 @@ case $targ in
h8300*-*-coff | \
h8500*-*-coff | \
hppa*-*-rtems* | \
i[3-7]86-*-unixware* | \
i[3-7]86-*-dgux* | \
i[3-7]86-*-chorus* | \
i[3-7]86-*-sysv* | \
i[3-7]86-*-isc* | \
i[3-7]86-*-sco* | \
i[3-7]86-*-coff | \
i[3-7]86-*-aix* | \
i[3-7]86-sequent-bsd* | \
i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12] | \
i[3-7]86-*-netbsdaout* | i[3-7]86-*-netbsd* | \
i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3] | \
i[3-7]86-*-linux*aout* | \
i[3-7]86-*-mach* | i[3-7]86-*-osf1mk* | \
i[3-7]86-*-os9k | \
i[3-7]86-none-* | \
i[3-7]86-*-aout* | i[3-7]86*-*-vsta* | \
i370-* | \
i860-*-* | \
i960-*-* | \
......@@ -587,13 +586,7 @@ case "${targ}" in
targ_selvecs=hppa_elf32_vec
;;
i[3-7]86-*-sco3.2v5*coff)
targ_defvec=i386_coff_vec
targ_selvecs=i386_elf32_vec
;;
i[3-7]86-*-sysv4* | i[3-7]86-*-unixware* | \
i[3-7]86-*-elf* | i[3-7]86-*-sco3.2v5* | \
i[3-7]86-*-dgux* | i[3-7]86-*-sysv5* | i[3-7]86-*-rtems*)
i[3-7]86-*-elf* | i[3-7]86-*-rtems*)
targ_defvec=i386_elf32_vec
targ_selvecs="iamcu_elf32_vec i386_coff_vec"
;;
......@@ -622,10 +615,6 @@ case "${targ}" in
targ_defvec=i386_elf32_vec
targ_selvecs=iamcu_elf32_vec
;;
i[3-7]86-*-chorus*)
targ_defvec=i386_elf32_vec
targ_selvecs=iamcu_elf32_vec
;;
i[3-7]86-*-dicos*)
targ_defvec=i386_elf32_vec
targ_selvecs=iamcu_elf32_vec
......@@ -635,20 +624,12 @@ case "${targ}" in
targ_defvec=i386_coff_go32_vec
targ_selvecs="i386_coff_go32stubbed_vec i386_aout_vec"
;;
i[3-7]86-*-sysv* | i[3-7]86-*-isc* | i[3-7]86-*-sco* | i[3-7]86-*-coff | \
i[3-7]86-*-aix*)
targ_defvec=i386_coff_vec
;;
i[3-7]86-*-darwin* | i[3-7]86-*-macos10* | i[3-7]86-*-rhapsody*)
targ_defvec=i386_mach_o_vec
targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
targ64_selvecs=x86_64_mach_o_vec
targ_archs="$targ_archs bfd_powerpc_arch bfd_rs6000_arch"
;;
i[3-7]86-sequent-bsd*)
targ_defvec=i386_aout_dynix_vec
targ_underscore=yes
;;
i[3-7]86-*-bsd*)
targ_defvec=i386_aout_bsd_vec
targ_underscore=yes
......@@ -658,12 +639,6 @@ case "${targ}" in
targ_selvecs=iamcu_elf32_vec
targ64_selvecs="x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec"
;;
i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | \
i[3-7]86-*-freebsd[12])
targ_defvec=i386_aout_fbsd_vec
targ_selvecs=i386_aout_bsd_vec
targ_underscore=yes
;;
i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
targ_defvec=i386_elf32_fbsd_vec
targ_selvecs="i386_elf32_vec iamcu_elf32_vec i386_pei_vec i386_coff_vec"
......@@ -676,31 +651,20 @@ case "${targ}" in
;;
i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu)
targ_defvec=i386_elf32_vec
targ_selvecs="i386_aout_nbsd_vec iamcu_elf32_vec"
targ_selvecs="iamcu_elf32_vec"
targ64_selvecs="x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec"
;;
i[3-7]86-*-netbsdpe*)
targ_defvec=i386_pe_vec
targ_selvecs="i386_pe_vec i386_pei_vec i386_elf32_vec iamcu_elf32_vec"
;;
i[3-7]86-*-netbsdaout* | i[3-7]86-*-netbsd* | \
i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3])
targ_defvec=i386_aout_nbsd_vec
targ_selvecs="i386_elf32_vec iamcu_elf32_vec i386_aout_bsd_vec"
targ_underscore=yes
;;
i[3-7]86-*-openbsd*)
targ_defvec=i386_elf32_vec
targ_selvecs="iamcu_elf32_vec i386_aout_nbsd_vec"
;;
i[3-7]86-*-linux*aout*)
targ_defvec=i386_aout_linux_vec
targ_selvecs="i386_elf32_vec iamcu_elf32_vec"
targ_underscore=yes
targ_selvecs="iamcu_elf32_vec"
;;
i[3-7]86-*-linux-*)
targ_defvec=i386_elf32_vec
targ_selvecs="iamcu_elf32_vec i386_aout_linux_vec i386_pei_vec"
targ_selvecs="iamcu_elf32_vec i386_pei_vec"
targ64_selvecs="x86_64_elf64_vec x86_64_elf32_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
;;
i[3-7]86-*-nacl*)
......@@ -747,12 +711,12 @@ case "${targ}" in
;;
x86_64-*-netbsd* | x86_64-*-openbsd*)
targ_defvec=x86_64_elf64_vec
targ_selvecs="i386_elf32_vec iamcu_elf32_vec i386_aout_nbsd_vec i386_coff_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
targ_selvecs="i386_elf32_vec iamcu_elf32_vec i386_coff_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
want64=true
;;
x86_64-*-linux-*)
targ_defvec=x86_64_elf64_vec
targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec i386_aout_linux_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec k1om_elf64_vec"
want64=true
;;
x86_64-*-nacl*)
......@@ -785,14 +749,6 @@ case "${targ}" in
targ_defvec=i386_elf32_vec
targ_selvecs=iamcu_elf32_vec
;;
i[3-7]86-*-mach* | i[3-7]86-*-osf1mk*)
targ_defvec=i386_aout_mach3_vec
targ_cflags=-DSTAT_FOR_EXEC
targ_underscore=yes
;;
i[3-7]86-*-os9k)
targ_defvec=i386_aout_os9k_vec
;;
i[3-7]86-*-msdos*)
targ_defvec=i386_aout_vec
targ_selvecs=i386_msdos_vec
......@@ -824,12 +780,6 @@ case "${targ}" in
targ_selvecs="i386_pe_vec i386_pei_vec i386_elf32_vec iamcu_elf32_vec"
targ_underscore=yes
;;
i[3-7]86-none-*)
targ_defvec=i386_coff_vec
;;
i[3-7]86-*-aout* | i[3-7]86*-*-vsta*)
targ_defvec=i386_aout_vec
;;
i[3-7]86-*-vxworks*)
targ_defvec=i386_elf32_vxworks_vec
targ_underscore=yes
......
......@@ -14398,13 +14398,7 @@ do
hppa_som_vec) tb="$tb som.lo" ;;
i386_aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
i386_aout_bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
i386_aout_dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
i386_aout_fbsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
i386_aout_linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
i386_aout_lynx_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
i386_aout_mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
i386_aout_nbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
i386_aout_os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
i386_coff_vec) tb="$tb coff-i386.lo $coff" ;;
i386_coff_go32_vec) tb="$tb coff-go32.lo $coff" ;;
i386_coff_go32stubbed_vec) tb="$tb coff-stgo32.lo $coff" ;;
......
......@@ -475,13 +475,7 @@ do
hppa_som_vec) tb="$tb som.lo" ;;
i386_aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
i386_aout_bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
i386_aout_dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
i386_aout_fbsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
i386_aout_linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
i386_aout_lynx_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
i386_aout_mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
i386_aout_nbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
i386_aout_os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
i386_coff_vec) tb="$tb coff-i386.lo $coff" ;;
i386_coff_go32_vec) tb="$tb coff-go32.lo $coff" ;;
i386_coff_go32stubbed_vec) tb="$tb coff-stgo32.lo $coff" ;;
......
......@@ -1098,17 +1098,9 @@ This file is the source for the generated files @file{elf32-target.h}
and @file{elf64-target.h}, one of which is included by every ELF target.
It defines the ELF target vector.
@item freebsd.h
@cindex @file{freebsd.h}
Presumably intended to be included by all FreeBSD targets, but in fact
there is only one such target, @samp{i386-freebsd}. This defines a
function used to set the right magic number for FreeBSD, as well as
various macros, and includes @file{aout-target.h}.
@item netbsd.h
@cindex @file{netbsd.h}
Like @file{freebsd.h}, except that there are several files which include
it.
Used by all netbsd aout targets. Several other files include it.
@item peicode.h
@cindex @file{peicode.h}
......
/* BFD back-end definitions used by all FreeBSD targets.
Copyright (C) 1990-2018 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
/* FreeBSD ZMAGIC files never have the header in the text. */
#define N_HEADER_IN_TEXT(x) 0
/* ZMAGIC files start at offset 0. Does not apply to QMAGIC files. */
#define TEXT_START_ADDR 0
#define N_GETMAGIC_NET(execp) \
((execp)->a_info & 0xffff)
#define N_GETMID_NET(execp) \
(((execp)->a_info >> 16) & 0x3ff)
#define N_GETFLAG_NET(exexp) \
(((execp)->a_info >> 26) & 0x3f)
#define N_MACHTYPE(execp) \
((enum machine_type) \
((N_GETMAGIC_NET (execp) == ZMAGIC) ? N_GETMID_NET (execp) : \
((execp)->a_info >> 16) & 0x3ff))
#define N_FLAGS(execp) \
((N_GETMAGIC_NET (execp) == ZMAGIC) ? N_GETFLAG_NET (execp) : \
((execp)->a_info >> 26) & 0x3f)
#define N_SET_INFO(execp, magic, type, flags) \
((execp)->a_info = ((magic) & 0xffff) \
| (((int)(type) & 0x3ff) << 16) \
| (((flags) & 0x3f) << 26))
#define N_SET_MACHTYPE(execp, machtype) \
((execp)->a_info = \
((execp)->a_info & 0xfb00ffff) | ((((int) (machtype)) & 0x3ff) << 16))
#define N_SET_FLAGS(execp, flags) \
((execp)->a_info = \
((execp)->a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
#include "sysdep.h"
#include "bfd.h"
#include "libbfd.h"
#include "libaout.h"
/* On FreeBSD, the magic number is always in i386 (little-endian)
format. I think. */
#define SWAP_MAGIC(ext) bfd_getl32 (ext)
#define MY_write_object_contents MY (write_object_contents)
static bfd_boolean MY (write_object_contents) (bfd *);
#include "aout-target.h"
/* Write an object file.
Section contents have already been written. We write the
file header, symbols, and relocation. */
static bfd_boolean
MY (write_object_contents) (bfd *abfd)
{
struct external_exec exec_bytes;
struct internal_exec *execp = exec_hdr (abfd);
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
/* Magic number, maestro, please! */
switch (bfd_get_arch(abfd))
{
case bfd_arch_sparc:
N_SET_MACHTYPE (execp, M_SPARC_NETBSD);
break;
case bfd_arch_i386:
N_SET_MACHTYPE (execp, M_386_NETBSD);
break;
case bfd_arch_ns32k:
N_SET_MACHTYPE (execp, M_532_NETBSD);
break;
default:
N_SET_MACHTYPE (execp, M_UNKNOWN);
break;
}
WRITE_HEADERS (abfd, execp);
return TRUE;
}
/* BFD back-end for i386 a.out binaries under dynix.
Copyright (C) 1994-2018 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
/* This BFD is currently only tested with gdb, writing object files
may not work. */
#define TEXT_START_ADDR 4096
#define TARGET_PAGE_SIZE 4096
#define SEGMENT_SIZE TARGET_PAGE_SIZE
#include "aout/dynix3.h"
#define DEFAULT_ARCH bfd_arch_i386
#define MACHTYPE_OK(mtype) ((mtype) == M_386 || (mtype) == M_UNKNOWN)
/* Do not "beautify" the CONCAT* macro args. Traditional C will not
remove whitespace added here, and thus will fail to concatenate
the tokens. */
#define MY(OP) CONCAT2 (i386_aout_dynix_,OP)
#define TARGETNAME "a.out-i386-dynix"
#define NAME(x,y) CONCAT3 (i386dynix,_32_,y)
#define ARCH_SIZE 32
#define NAME_swap_exec_header_in NAME(i386dynix_32_,swap_exec_header_in)
#define MY_get_section_contents aout_32_get_section_contents
/* aoutx.h requires definitions for NMAGIC, BMAGIC and QMAGIC. */
#define NMAGIC 0
#define BMAGIC OMAGIC
#define QMAGIC XMAGIC
#include "aoutx.h"
/* (Ab)use some fields in the internal exec header to be able to read
executables that contain shared data. */
#define a_shdata a_tload
#define a_shdrsize a_dload
void
i386dynix_32_swap_exec_header_in (bfd *abfd,
struct external_exec *raw_bytes,
struct internal_exec *execp)
{
struct external_exec *bytes = (struct external_exec *)raw_bytes;
/* The internal_exec structure has some fields that are unused in this
configuration (IE for i960), so ensure that all such uninitialized
fields are zero'd out. There are places where two of these structs
are memcmp'd, and thus the contents do matter. */
memset (execp, 0, sizeof (struct internal_exec));
/* Now fill in fields in the execp, from the bytes in the raw data. */
execp->a_info = H_GET_32 (abfd, bytes->e_info);
execp->a_text = GET_WORD (abfd, bytes->e_text);
execp->a_data = GET_WORD (abfd, bytes->e_data);
execp->a_bss = GET_WORD (abfd, bytes->e_bss);
execp->a_syms = GET_WORD (abfd, bytes->e_syms);
execp->a_entry = GET_WORD (abfd, bytes->e_entry);
execp->a_trsize = GET_WORD (abfd, bytes->e_trsize);
execp->a_drsize = GET_WORD (abfd, bytes->e_drsize);
execp->a_shdata = GET_WORD (abfd, bytes->e_shdata);
execp->a_shdrsize = GET_WORD (abfd, bytes->e_shdrsize);
}
#include "aout-target.h"
/* BFD back-end for FreeBSD/386 a.out-ish binaries.
Copyright (C) 1990-2018 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
#define BYTES_IN_WORD 4
#undef TARGET_IS_BIG_ENDIAN_P
#define TARGET_PAGE_SIZE 4096
#define SEGMENT_SIZE TARGET_PAGE_SIZE
#define DEFAULT_ARCH bfd_arch_i386
#define MACHTYPE_OK(mtype) ((mtype) == M_386_NETBSD || (mtype) == M_UNKNOWN)
/* Do not "beautify" the CONCAT* macro args. Traditional C will not
remove whitespace added here, and thus will fail to concatenate
the tokens. */
#define MY(OP) CONCAT2 (i386_aout_fbsd_,OP)
/* This needs to start with a.out so GDB knows it is an a.out variant. */
#define TARGETNAME "a.out-i386-freebsd"
#include "freebsd.h"
This diff is collapsed.
/* BFD back-end for i386 a.out binaries.
Copyright (C) 1990-2018 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
/* This is for Mach 3, which uses a.out, not Mach-O. */
/* There is no magic number or anything which lets us distinguish this target
from i386aout or i386bsd. So this target is only useful if it is the
default target. */
#define TARGET_PAGE_SIZE 1
#define SEGMENT_SIZE 0x1000
#define TEXT_START_ADDR 0x10000
#define ARCH 32
/* This macro is only relevant when N_MAGIC(x) == ZMAGIC. */
#define N_HEADER_IN_TEXT(x) 1
#define N_TXTSIZE(x) ((x)->a_text)
#include "sysdep.h"
#include "bfd.h"
#include "libbfd.h"
#include "aout/aout64.h"
#include "aout/stab_gnu.h"
#include "aout/ar.h"
#include "libaout.h" /* BFD a.out internal data structures */
#define DEFAULT_ARCH bfd_arch_i386
/* Do not "beautify" the CONCAT* macro args. Traditional C will not
remove whitespace added here, and thus will fail to concatenate
the tokens. */
#define MY(OP) CONCAT2 (i386_aout_mach3_,OP)
#define TARGETNAME "a.out-mach3"
static bfd_boolean MY (set_sizes) (bfd *);
#define MY_backend_data &MY(backend_data)
static const struct aout_backend_data MY(backend_data) =
{
0, /* zmagic contiguous */
1, /* text incl header */
0, /* entry is text address */
0, /* exec_hdr_flags */
0, /* text vma? */
MY(set_sizes),
1, /* exec header not counted */
0, /* add_dynamic_symbols */
0, /* add_one_symbol */
0, /* link_dynamic_object */
0, /* write_dynamic_symbol */
0, /* check_dynamic_reloc */
0 /* finish_dynamic_link */
};