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.
This commit is contained in:
parent
e2e4f0fdfd
commit
c65c21e1ff
@ -1,3 +1,21 @@
|
||||
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
|
||||
|
6
bfd/configure
vendored
6
bfd/configure
vendored
@ -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}
|
||||
|
100
bfd/freebsd.h
100
bfd/freebsd.h
@ -1,100 +0,0 @@
|
||||
/* 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;
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
/* 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"
|
@ -1,38 +0,0 @@
|
||||
/* 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"
|
733
bfd/i386linux.c
733
bfd/i386linux.c
@ -1,733 +0,0 @@
|
||||
/* BFD back-end for linux flavored i386 a.out binaries.
|
||||
Copyright (C) 1992-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 TARGET_PAGE_SIZE 4096
|
||||
#define ZMAGIC_DISK_BLOCK_SIZE 1024
|
||||
#define SEGMENT_SIZE TARGET_PAGE_SIZE
|
||||
#define TEXT_START_ADDR 0x0
|
||||
|
||||
#define MACHTYPE_OK(mtype) ((mtype) == M_386 || (mtype) == M_UNKNOWN)
|
||||
|
||||
#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_linux_,OP)
|
||||
#define TARGETNAME "a.out-i386-linux"
|
||||
|
||||
extern const bfd_target MY(vec);
|
||||
|
||||
/* We always generate QMAGIC files in preference to ZMAGIC files. It
|
||||
would be possible to make this a linker option, if that ever
|
||||
becomes important. */
|
||||
|
||||
static void MY_final_link_callback
|
||||
(bfd *, file_ptr *, file_ptr *, file_ptr *);
|
||||
static bfd_boolean i386linux_bfd_final_link
|
||||
(bfd *, struct bfd_link_info *);
|
||||
static bfd_boolean i386linux_write_object_contents (bfd *);
|
||||
|
||||
static bfd_boolean
|
||||
i386linux_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
|
||||
{
|
||||
obj_aout_subformat (abfd) = q_magic_format;
|
||||
return NAME(aout,final_link) (abfd, info, MY_final_link_callback);
|
||||
}
|
||||
|
||||
#define MY_bfd_final_link i386linux_bfd_final_link
|
||||
|
||||
/* Set the machine type correctly. */
|
||||
|
||||
static bfd_boolean
|
||||
i386linux_write_object_contents (bfd *abfd)
|
||||
{
|
||||
struct external_exec exec_bytes;
|
||||
struct internal_exec *execp = exec_hdr (abfd);
|
||||
|
||||
N_SET_MACHTYPE (execp, M_386);
|
||||
|
||||
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
|
||||
|
||||
WRITE_HEADERS (abfd, execp);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#define MY_write_object_contents i386linux_write_object_contents
|
||||
|
||||
/* Code to link against Linux a.out shared libraries. */
|
||||
|
||||
/* See if a symbol name is a reference to the global offset table. */
|
||||
|
||||
#ifndef GOT_REF_PREFIX
|
||||
#define GOT_REF_PREFIX "__GOT_"
|
||||
#endif
|
||||
|
||||
#define IS_GOT_SYM(name) (CONST_STRNEQ (name, GOT_REF_PREFIX))
|
||||
|
||||
/* See if a symbol name is a reference to the procedure linkage table. */
|
||||
|
||||
#ifndef PLT_REF_PREFIX
|
||||
#define PLT_REF_PREFIX "__PLT_"
|
||||
#endif
|
||||
|
||||
#define IS_PLT_SYM(name) (CONST_STRNEQ (name, PLT_REF_PREFIX))
|
||||
|
||||
/* This string is used to generate specialized error messages. */
|
||||
|
||||
#ifndef NEEDS_SHRLIB
|
||||
#define NEEDS_SHRLIB "__NEEDS_SHRLIB_"
|
||||
#endif
|
||||
|
||||
/* This special symbol is a set vector that contains a list of
|
||||
pointers to fixup tables. It will be present in any dynamically
|
||||
linked file. The linker generated fixup table should also be added
|
||||
to the list, and it should always appear in the second slot (the
|
||||
first one is a dummy with a magic number that is defined in
|
||||
crt0.o). */
|
||||
|
||||
#ifndef SHARABLE_CONFLICTS
|
||||
#define SHARABLE_CONFLICTS "__SHARABLE_CONFLICTS__"
|
||||
#endif
|
||||
|
||||
/* We keep a list of fixups. The terminology is a bit strange, but
|
||||
each fixup contains two 32 bit numbers. A regular fixup contains
|
||||
an address and a pointer, and at runtime we should store the
|
||||
address at the location pointed to by the pointer. A builtin fixup
|
||||
contains two pointers, and we should read the address using one
|
||||
pointer and store it at the location pointed to by the other
|
||||
pointer. Builtin fixups come into play when we have duplicate
|
||||
__GOT__ symbols for the same variable. The builtin fixup will copy
|
||||
the GOT pointer from one over into the other. */
|
||||
|
||||
struct fixup
|
||||
{
|
||||
struct fixup *next;
|
||||
struct linux_link_hash_entry *h;
|
||||
bfd_vma value;
|
||||
|
||||
/* Nonzero if this is a jump instruction that needs to be fixed,
|
||||
zero if this is just a pointer */
|
||||
char jump;
|
||||
|
||||
char builtin;
|
||||
};
|
||||
|
||||
/* We don't need a special hash table entry structure, but we do need
|
||||
to keep some information between linker passes, so we use a special
|
||||
hash table. */
|
||||
|
||||
struct linux_link_hash_entry
|
||||
{
|
||||
struct aout_link_hash_entry root;
|
||||
};
|
||||
|
||||
struct linux_link_hash_table
|
||||
{
|
||||
struct aout_link_hash_table root;
|
||||
|
||||
/* First dynamic object found in link. */
|
||||
bfd *dynobj;
|
||||
|
||||
/* Number of fixups. */
|
||||
size_t fixup_count;
|
||||
|
||||
/* Number of builtin fixups. */
|
||||
size_t local_builtins;
|
||||
|
||||
/* List of fixups. */
|
||||
struct fixup *fixup_list;
|
||||
};
|
||||
|
||||
/* Routine to create an entry in an Linux link hash table. */
|
||||
|
||||
static struct bfd_hash_entry *
|
||||
linux_link_hash_newfunc (struct bfd_hash_entry *entry,
|
||||
struct bfd_hash_table *table,
|
||||
const char *string)
|
||||
{
|
||||
struct linux_link_hash_entry *ret = (struct linux_link_hash_entry *) entry;
|
||||
|
||||
/* Allocate the structure if it has not already been allocated by a
|
||||
subclass. */
|
||||
if (ret == (struct linux_link_hash_entry *) NULL)
|
||||
ret = ((struct linux_link_hash_entry *)
|
||||
bfd_hash_allocate (table, sizeof (struct linux_link_hash_entry)));
|
||||
if (ret == NULL)
|
||||
return (struct bfd_hash_entry *) ret;
|
||||
|
||||
/* Call the allocation method of the superclass. */
|
||||
ret = ((struct linux_link_hash_entry *)
|
||||
NAME(aout,link_hash_newfunc) ((struct bfd_hash_entry *) ret,
|
||||
table, string));
|
||||
if (ret != NULL)
|
||||
{
|
||||
/* Set local fields; there aren't any. */
|
||||
}
|
||||
|
||||
return (struct bfd_hash_entry *) ret;
|
||||
}
|
||||
|
||||
/* Create a Linux link hash table. */
|
||||
|
||||
static struct bfd_link_hash_table *
|
||||
linux_link_hash_table_create (bfd *abfd)
|
||||
{
|
||||
struct linux_link_hash_table *ret;
|
||||
bfd_size_type amt = sizeof (struct linux_link_hash_table);
|
||||
|
||||
ret = (struct linux_link_hash_table *) bfd_zmalloc (amt);
|
||||
if (ret == (struct linux_link_hash_table *) NULL)
|
||||
return (struct bfd_link_hash_table *) NULL;
|
||||
if (!NAME(aout,link_hash_table_init) (&ret->root, abfd,
|
||||
linux_link_hash_newfunc,
|
||||
sizeof (struct linux_link_hash_entry)))
|
||||
{
|
||||
free (ret);
|
||||
return (struct bfd_link_hash_table *) NULL;
|
||||
}
|
||||
|
||||
return &ret->root.root;
|
||||
}
|
||||
|
||||
/* Look up an entry in a Linux link hash table. */
|
||||
|
||||
#define linux_link_hash_lookup(table, string, create, copy, follow) \
|
||||
((struct linux_link_hash_entry *) \
|
||||
aout_link_hash_lookup (&(table)->root, (string), (create), (copy),\
|
||||
(follow)))
|
||||
|
||||
/* Traverse a Linux link hash table. */
|
||||
|
||||
#define linux_link_hash_traverse(table, func, info) \
|
||||
(aout_link_hash_traverse \
|
||||
(&(table)->root, \
|
||||
(bfd_boolean (*) (struct aout_link_hash_entry *, void *)) (func), \
|
||||
(info)))
|
||||
|
||||
/* Get the Linux link hash table from the info structure. This is
|
||||
just a cast. */
|
||||
|
||||
#define linux_hash_table(p) ((struct linux_link_hash_table *) ((p)->hash))
|
||||
|
||||
/* Store the information for a new fixup. */
|
||||
|
||||
static struct fixup *
|
||||
new_fixup (struct bfd_link_info *info,
|
||||
struct linux_link_hash_entry *h,
|
||||
bfd_vma value,
|
||||
int builtin)
|
||||
{
|
||||
struct fixup *f;
|
||||
|
||||
f = (struct fixup *) bfd_hash_allocate (&info->hash->table,
|
||||
sizeof (struct fixup));
|
||||
if (f == NULL)
|
||||
return f;
|
||||
f->next = linux_hash_table (info)->fixup_list;
|
||||
linux_hash_table (info)->fixup_list = f;
|
||||
f->h = h;
|
||||
f->value = value;
|
||||
f->builtin = builtin;
|
||||
f->jump = 0;
|
||||
++linux_hash_table (info)->fixup_count;
|
||||
return f;
|
||||
}
|
||||
|
||||
/* We come here once we realize that we are going to link to a shared
|
||||
library. We need to create a special section that contains the
|
||||
fixup table, and we ultimately need to add a pointer to this into
|
||||
the set vector for SHARABLE_CONFLICTS. At this point we do not
|
||||
know the size of the section, but that's OK - we just need to
|
||||
create it for now. */
|
||||
|
||||
static bfd_boolean
|
||||
linux_link_create_dynamic_sections (bfd *abfd,
|
||||
struct bfd_link_info *info ATTRIBUTE_UNUSED)
|
||||
{
|
||||
flagword flags;
|
||||
asection *s;
|
||||
|
||||
/* Note that we set the SEC_IN_MEMORY flag. */
|
||||
flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY;
|
||||
|
||||
/* We choose to use the name ".linux-dynamic" for the fixup table.
|
||||
Why not? */
|
||||
s = bfd_make_section_with_flags (abfd, ".linux-dynamic", flags);
|
||||
if (s == NULL
|
||||
|| ! bfd_set_section_alignment (abfd, s, 2))
|
||||
return FALSE;
|
||||
s->size = 0;
|
||||
s->contents = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Function to add a single symbol to the linker hash table. This is
|
||||
a wrapper around _bfd_generic_link_add_one_symbol which handles the
|
||||
tweaking needed for dynamic linking support. */
|
||||
|
||||
static bfd_boolean
|
||||
linux_add_one_symbol (struct bfd_link_info *info,
|
||||
bfd *abfd,
|
||||
const char *name,
|
||||
flagword flags,
|
||||
asection *section,
|
||||
bfd_vma value,
|
||||
const char *string,
|
||||
bfd_boolean copy,
|
||||
bfd_boolean collect,
|
||||
struct bfd_link_hash_entry **hashp)
|
||||
{
|
||||
struct linux_link_hash_entry *h;
|
||||
bfd_boolean insert;
|
||||
|
||||
/* Look up and see if we already have this symbol in the hash table.
|
||||
If we do, and the defining entry is from a shared library, we
|
||||
need to create the dynamic sections.
|
||||
|
||||
FIXME: What if abfd->xvec != info->output_bfd->xvec? We may
|
||||
want to be able to link Linux a.out and ELF objects together,
|
||||
but serious confusion is possible. */
|
||||
|
||||
insert = FALSE;
|
||||
|
||||
if (! bfd_link_relocatable (info)
|
||||
&& linux_hash_table (info)->dynobj == NULL
|
||||
&& strcmp (name, SHARABLE_CONFLICTS) == 0
|
||||
&& (flags & BSF_CONSTRUCTOR) != 0
|
||||
&& abfd->xvec == info->output_bfd->xvec)
|
||||
{
|
||||
if (! linux_link_create_dynamic_sections (abfd, info))
|
||||
return FALSE;
|
||||
linux_hash_table (info)->dynobj = abfd;
|
||||
insert = TRUE;
|
||||
}
|
||||
|
||||
if (bfd_is_abs_section (section)
|
||||
&& abfd->xvec == info->output_bfd->xvec)
|
||||
{
|
||||
h = linux_link_hash_lookup (linux_hash_table (info), name, FALSE,
|
||||
FALSE, FALSE);
|
||||
if (h != NULL
|
||||
&& (h->root.root.type == bfd_link_hash_defined
|
||||
|| h->root.root.type == bfd_link_hash_defweak))
|
||||
{
|
||||
struct fixup *f;
|
||||
|
||||
if (hashp != NULL)
|
||||
*hashp = (struct bfd_link_hash_entry *) h;
|
||||
|
||||
f = new_fixup (info, h, value, ! IS_PLT_SYM (name));
|
||||
if (f == NULL)
|
||||
return FALSE;
|
||||
f->jump = IS_PLT_SYM (name);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Do the usual procedure for adding a symbol. */
|
||||
if (! _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section,
|
||||
value, string, copy, collect,
|
||||
hashp))
|
||||
return FALSE;
|
||||
|
||||
/* Insert a pointer to our table in the set vector. The dynamic
|
||||
linker requires this information */
|
||||
if (insert)
|
||||
{
|
||||
asection *s;
|
||||
|
||||
/* Here we do our special thing to add the pointer to the
|
||||
dynamic section in the SHARABLE_CONFLICTS set vector. */
|
||||
s = bfd_get_section_by_name (linux_hash_table (info)->dynobj,
|
||||
".linux-dynamic");
|
||||
BFD_ASSERT (s != NULL);
|
||||
|
||||
if (! (_bfd_generic_link_add_one_symbol
|
||||
(info, linux_hash_table (info)->dynobj, SHARABLE_CONFLICTS,
|
||||
BSF_GLOBAL | BSF_CONSTRUCTOR, s, (bfd_vma) 0, NULL,
|
||||
FALSE, FALSE, NULL)))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* We will crawl the hash table and come here for every global symbol.
|
||||
We will examine each entry and see if there are indications that we
|
||||
need to add a fixup. There are two possible cases - one is where
|
||||
you have duplicate definitions of PLT or GOT symbols - these will
|
||||
have already been caught and added as "builtin" fixups. If we find
|
||||
that the corresponding non PLT/GOT symbol is also present, we
|
||||
convert it to a regular fixup instead.
|
||||
|
||||
This function is called via linux_link_hash_traverse. */
|
||||
|
||||
static bfd_boolean
|
||||
linux_tally_symbols (struct linux_link_hash_entry *h, void * data)
|
||||
{
|
||||
struct bfd_link_info *info = (struct bfd_link_info *) data;
|
||||
struct fixup *f, *f1;
|
||||
int is_plt;
|
||||
struct linux_link_hash_entry *h1, *h2;
|
||||
bfd_boolean exists;
|
||||
|
||||
if (h->root.root.type == bfd_link_hash_undefined
|
||||
&& CONST_STRNEQ (h->root.root.root.string, NEEDS_SHRLIB))
|
||||
{
|
||||
const char *name;
|
||||
char *p;
|
||||
char *alloc = NULL;
|
||||
|
||||
name = h->root.root.root.string + sizeof NEEDS_SHRLIB - 1;
|
||||
p = strrchr (name, '_');
|
||||
if (p != NULL)
|
||||
alloc = (char *) bfd_malloc ((bfd_size_type) strlen (name) + 1);
|
||||
|
||||
if (p == NULL || alloc == NULL)
|
||||
_bfd_error_handler (_("output file requires shared library `%s'"),
|
||||
name);
|
||||
else
|
||||
{
|
||||
strcpy (alloc, name);
|
||||
p = strrchr (alloc, '_');
|
||||
*p++ = '\0';
|
||||
_bfd_error_handler
|
||||
(_("output file requires shared library `%s.so.%s'"),
|
||||
alloc, p);
|
||||
free (alloc);
|
||||
}
|
||||
|
||||
abort ();
|
||||
}
|
||||
|
||||
/* If this symbol is not a PLT/GOT, we do not even need to look at it */
|
||||
is_plt = IS_PLT_SYM (h->root.root.root.string);
|
||||
|
||||
if (is_plt || IS_GOT_SYM (h->root.root.root.string))
|
||||
{
|
||||
/* Look up this symbol twice. Once just as a regular lookup,
|
||||
and then again following all of the indirect links until we
|
||||
reach a real symbol. */
|
||||
h1 = linux_link_hash_lookup (linux_hash_table (info),
|
||||
(h->root.root.root.string
|
||||
+ sizeof PLT_REF_PREFIX - 1),
|
||||
FALSE, FALSE, TRUE);
|
||||
/* h2 does not follow indirect symbols. */
|
||||
h2 = linux_link_hash_lookup (linux_hash_table (info),
|
||||
(h->root.root.root.string
|
||||
+ sizeof PLT_REF_PREFIX - 1),
|
||||
FALSE, FALSE, FALSE);
|
||||
|
||||
/* The real symbol must exist but if it is also an ABS symbol,
|
||||
there is no need to have a fixup. This is because they both
|
||||
came from the same library. If on the other hand, we had to
|
||||
use an indirect symbol to get to the real symbol, we add the
|
||||
fixup anyway, since there are cases where these symbols come
|
||||
from different shared libraries */
|
||||
if (h1 != NULL
|
||||
&& (((h1->root.root.type == bfd_link_hash_defined
|
||||
|| h1->root.root.type == bfd_link_hash_defweak)
|
||||
&& ! bfd_is_abs_section (h1->root.root.u.def.section))
|
||||
|| h2->root.root.type == bfd_link_hash_indirect))
|
||||
{
|
||||
/* See if there is a "builtin" fixup already present
|
||||
involving this symbol. If so, convert it to a regular
|
||||
fixup. In the end, this relaxes some of the requirements
|
||||
about the order of performing fixups. */
|
||||
exists = FALSE;
|
||||
for (f1 = linux_hash_table (info)->fixup_list;
|
||||
f1 != NULL;
|
||||
f1 = f1->next)
|
||||
{
|
||||
if ((f1->h != h && f1->h != h1)
|
||||
|| (! f1->builtin && ! f1->jump))
|
||||
continue;
|
||||
if (f1->h == h1)
|
||||
exists = TRUE;
|
||||
if (! exists
|
||||
&& bfd_is_abs_section (h->root.root.u.def.section))
|
||||
{
|
||||
f = new_fixup (info, h1, f1->h->root.root.u.def.value, 0);
|
||||
f->jump = is_plt;
|
||||
}
|
||||
f1->h = h1;
|
||||
f1->jump = is_plt;
|
||||
f1->builtin = 0;
|
||||
exists = TRUE;
|
||||
}
|
||||
if (! exists
|
||||
&& bfd_is_abs_section (h->root.root.u.def.section))
|
||||
{
|
||||
f = new_fixup (info, h1, h->root.root.u.def.value, 0);
|
||||
if (f == NULL)
|
||||
{
|
||||
/* FIXME: No way to return error. */
|
||||
abort ();
|
||||
}
|
||||
f->jump = is_plt;
|
||||
}
|
||||
}
|
||||
|
||||
/* Quick and dirty way of stripping these symbols from the
|
||||
symtab. */
|
||||
if (bfd_is_abs_section (h->root.root.u.def.section))
|
||||
h->root.written = TRUE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* This is called to set the size of the .linux-dynamic section is.
|
||||
It is called by the Linux linker emulation before_allocation
|
||||
routine. We have finished reading all of the input files, and now
|
||||
we just scan the hash tables to find out how many additional fixups
|
||||
are required. */
|
||||
|
||||
bfd_boolean
|
||||
bfd_i386linux_size_dynamic_sections (bfd *output_bfd,
|
||||
struct bfd_link_info *info)
|
||||
{
|
||||
struct fixup *f;
|
||||
asection *s;
|
||||
|
||||
if (output_bfd->xvec != &MY(vec))
|
||||
return TRUE;
|
||||
|
||||
/* First find the fixups... */
|
||||
linux_link_hash_traverse (linux_hash_table (info),
|
||||
linux_tally_symbols,
|
||||
info);
|
||||
|
||||
/* If there are builtin fixups, leave room for a marker. This is
|
||||
used by the dynamic linker so that it knows that all that follow
|
||||
are builtin fixups instead of regular fixups. */
|
||||
for (f = linux_hash_table (info)->fixup_list; f != NULL; f = f->next)
|
||||
{
|
||||
if (f->builtin)
|
||||
{
|
||||
++linux_hash_table (info)->fixup_count;
|
||||
++linux_hash_table (info)->local_builtins;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (linux_hash_table (info)->dynobj == NULL)
|
||||
{
|
||||
if (linux_hash_table (info)->fixup_count > 0)
|
||||
abort ();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Allocate memory for our fixup table. We will fill it in later. */
|
||||
s = bfd_get_section_by_name (linux_hash_table (info)->dynobj,
|
||||
".linux-dynamic");
|
||||
if (s != NULL)
|
||||
{
|
||||
s->size = linux_hash_table (info)->fixup_count + 1;
|
||||
s->size *= 8;
|
||||
s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->size);
|
||||
if (s->contents == NULL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* We come here once we are ready to actually write the fixup table to
|
||||
the output file. Scan the fixup tables and so forth and generate
|
||||
the stuff we need. */
|
||||
|
||||
static bfd_boolean
|
||||
linux_finish_dynamic_link (bfd *output_bfd,
|
||||
struct bfd_link_info *info)
|
||||
{
|
||||
asection *s, *os, *is;
|
||||
bfd_byte *fixup_table;
|
||||
struct linux_link_hash_entry *h;
|
||||
struct fixup *f;
|
||||
unsigned int new_addr;
|
||||
int section_offset;
|
||||
unsigned int fixups_written;
|
||||
|
||||
if (linux_hash_table (info)->dynobj == NULL)
|
||||
return TRUE;
|
||||
|
||||
s = bfd_get_section_by_name (linux_hash_table (info)->dynobj,
|
||||
".linux-dynamic");
|
||||
BFD_ASSERT (s != NULL);
|
||||
os = s->output_section;
|
||||
fixups_written = 0;
|
||||
|
||||
#ifdef LINUX_LINK_DEBUG
|
||||
printf ("Fixup table file offset: %x VMA: %x\n",
|
||||
os->filepos + s->output_offset,
|
||||
os->vma + s->output_offset);
|
||||
#endif
|
||||
|
||||
fixup_table = s->contents;
|
||||
bfd_put_32 (output_bfd,
|
||||
(bfd_vma) linux_hash_table (info)->fixup_count, fixup_table);
|
||||
fixup_table += 4;
|
||||
|
||||
/* Fill in fixup table. */
|
||||
for (f = linux_hash_table (info)->fixup_list; f != NULL; f = f->next)
|
||||
{
|
||||
if (f->builtin)
|
||||
continue;
|
||||
|
||||
if (f->h->root.root.type != bfd_link_hash_defined
|
||||
&& f->h->root.root.type != bfd_link_hash_defweak)
|
||||
{
|
||||
_bfd_error_handler
|
||||
(_("symbol %s not defined for fixups"),
|
||||
f->h->root.root.root.string);
|
||||
continue;
|
||||
}
|
||||
|
||||
is = f->h->root.root.u.def.section;
|
||||
section_offset = is->output_section->vma + is->output_offset;
|
||||
new_addr = f->h->root.root.u.def.value + section_offset;
|
||||
|
||||
#ifdef LINUX_LINK_DEBUG
|
||||
printf ("Fixup(%d) %s: %x %x\n",f->jump, f->h->root.root.string,
|
||||
new_addr, f->value);
|
||||
#endif
|
||||
|
||||
if (f->jump)
|
||||
{
|
||||
/* Relative address */
|
||||
new_addr = new_addr - (f->value + 5);
|
||||
bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
|
||||
fixup_table += 4;
|
||||
bfd_put_32 (output_bfd, f->value + 1, fixup_table);
|
||||
fixup_table += 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
|
||||
fixup_table += 4;
|
||||
bfd_put_32 (output_bfd, f->value, fixup_table);
|
||||
fixup_table += 4;
|
||||
}
|
||||
++fixups_written;
|
||||
}
|
||||
|
||||
if (linux_hash_table (info)->local_builtins != 0)
|
||||
{
|
||||
/* Special marker so we know to switch to the other type of fixup */
|
||||
bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
|
||||
fixup_table += 4;
|
||||
bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
|
||||
fixup_table += 4;
|
||||
++fixups_written;
|
||||
for (f = linux_hash_table (info)->fixup_list; f != NULL; f = f->next)
|
||||
{
|
||||
if (! f->builtin)
|
||||
continue;
|
||||
|
||||
if (f->h->root.root.type != bfd_link_hash_defined
|
||||
&& f->h->root.root.type != bfd_link_hash_defweak)
|
||||
{
|
||||
_bfd_error_handler
|
||||
(_("symbol %s not defined for fixups"),
|
||||
f->h->root.root.root.string);
|
||||
continue;
|
||||
}
|
||||
|
||||
is = f->h->root.root.u.def.section;
|
||||
section_offset = is->output_section->vma + is->output_offset;
|
||||
new_addr = f->h->root.root.u.def.value + section_offset;
|
||||
|
||||
#ifdef LINUX_LINK_DEBUG
|
||||
printf ("Fixup(B) %s: %x %x\n", f->h->root.root.string,
|
||||
new_addr, f->value);
|
||||
#endif
|
||||
|
||||
bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
|
||||
fixup_table += 4;
|
||||
bfd_put_32 (output_bfd, f->value, fixup_table);
|
||||
fixup_table += 4;
|
||||
++fixups_written;
|
||||
}
|
||||
}
|
||||
|
||||
if (linux_hash_table (info)->fixup_count != fixups_written)
|
||||
{
|
||||
_bfd_error_handler (_("warning: fixup count mismatch"));
|
||||
while (linux_hash_table (info)->fixup_count > fixups_written)
|
||||
{
|
||||
bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
|
||||
fixup_table += 4;
|
||||
bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
|
||||
fixup_table += 4;
|
||||
++fixups_written;
|
||||
}
|
||||
}
|
||||
|
||||
h = linux_link_hash_lookup (linux_hash_table (info),
|
||||
"__BUILTIN_FIXUPS__",
|
||||
FALSE, FALSE, FALSE);
|
||||
|
||||
if (h != NULL
|
||||
&& (h->root.root.type == bfd_link_hash_defined
|
||||
|| h->root.root.type == bfd_link_hash_defweak))
|
||||
{
|
||||
is = h->root.root.u.def.section;
|
||||
section_offset = is->output_section->vma + is->output_offset;
|
||||
new_addr = h->root.root.u.def.value + section_offset;
|
||||
|
||||
#ifdef LINUX_LINK_DEBUG
|
||||
printf ("Builtin fixup table at %x\n", new_addr);
|
||||
#endif
|
||||
|
||||
bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
|
||||
}
|
||||
else
|
||||
bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
|
||||
|
||||
if (bfd_seek (output_bfd, (file_ptr) (os->filepos + s->output_offset),
|
||||
SEEK_SET) != 0)
|
||||
return FALSE;
|
||||
|
||||
if (bfd_bwrite (s->contents, s->size, output_bfd) != s->size)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#define MY_bfd_link_hash_table_create linux_link_hash_table_create
|
||||
#define MY_add_one_symbol linux_add_one_symbol
|
||||
#define MY_finish_dynamic_link linux_finish_dynamic_link
|
||||
|
||||
#define MY_zmagic_contiguous 1
|
||||
|
||||
#include "aout-target.h"
|
@ -1,73 +0,0 @@
|
||||
/* 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 */
|
||||
};
|
||||
|
||||
#include "aout-target.h"
|
@ -1,38 +0,0 @@
|
||||
/* BFD back-end for NetBSD/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 DEFAULT_MID M_386_NETBSD
|
||||
|
||||
/* 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_nbsd_,OP)
|
||||
|
||||
/* This needs to start with a.out so GDB knows it is an a.out variant. */
|
||||
#define TARGETNAME "a.out-i386-netbsd"
|
||||
|
||||
#include "netbsd.h"
|
242
bfd/i386os9k.c
242
bfd/i386os9k.c
@ -1,242 +0,0 @@
|
||||
/* BFD back-end for os9000 i386 binaries.
|
||||
Copyright (C) 1990-2018 Free Software Foundation, Inc.
|
||||
Written by Cygnus Support.
|
||||
|
||||
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. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
#include "bfdlink.h"
|
||||
#include "libaout.h" /* BFD a.out internal data structures */
|
||||
#include "os9k.h"
|
||||
|
||||
/* Swaps the information in an executable header taken from a raw byte
|
||||
stream memory image, into the internal exec_header structure. */
|
||||
static bfd_boolean
|
||||
os9k_swap_exec_header_in (bfd *abfd,
|
||||
mh_com *raw_bytes,
|
||||
struct internal_exec *execp)
|
||||
{
|
||||
mh_com *bytes = (mh_com *) raw_bytes;
|
||||
unsigned int dload, dmemsize, dmemstart;
|
||||
|
||||
/* Now fill in fields in the execp, from the bytes in the raw data. */
|
||||
execp->a_info = H_GET_16 (abfd, bytes->m_sync);
|
||||
execp->a_syms = 0;
|
||||
execp->a_entry = H_GET_32 (abfd, bytes->m_exec);
|
||||
execp->a_talign = 2;
|
||||
execp->a_dalign = 2;
|
||||
execp->a_balign = 2;
|
||||
|
||||
dload = H_GET_32 (abfd, bytes->m_idata);
|
||||
execp->a_data = dload + 8;
|
||||
|
||||
if (bfd_seek (abfd, (file_ptr) dload, SEEK_SET) != 0
|
||||
|| (bfd_bread (&dmemstart, (bfd_size_type) sizeof (dmemstart), abfd)
|
||||
!= sizeof (dmemstart))
|
||||
|| (bfd_bread (&dmemsize, (bfd_size_type) sizeof (dmemsize), abfd)
|
||||
!= sizeof (dmemsize)))
|
||||
return FALSE;
|
||||
|
||||
execp->a_tload = 0;
|
||||
execp->a_dload = H_GET_32 (abfd, (unsigned char *) &dmemstart);
|
||||
execp->a_text = dload - execp->a_tload;
|
||||
execp->a_data = H_GET_32 (abfd, (unsigned char *) &dmemsize);
|
||||
execp->a_bss = H_GET_32 (abfd, bytes->m_data) - execp->a_data;
|
||||
|
||||
execp->a_trsize = 0;
|
||||
execp->a_drsize = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/* Finish up the opening of a b.out file for reading. Fill in all the
|
||||
fields that are not handled by common code. */
|
||||
|
||||
static const bfd_target *
|
||||
os9k_callback (bfd *abfd)
|
||||
{
|
||||
struct internal_exec *execp = exec_hdr (abfd);
|
||||
unsigned long bss_start;
|
||||
|
||||
/* Architecture and machine type. */
|
||||
bfd_set_arch_mach (abfd, bfd_arch_i386, 0);
|
||||
|
||||
/* The positions of the string table and symbol table. */
|
||||
obj_str_filepos (abfd) = 0;
|
||||
obj_sym_filepos (abfd) = 0;
|
||||
|
||||
/* The alignments of the sections. */
|
||||
obj_textsec (abfd)->alignment_power = execp->a_talign;
|
||||
obj_datasec (abfd)->alignment_power = execp->a_dalign;
|
||||
obj_bsssec (abfd)->alignment_power = execp->a_balign;
|
||||
|
||||
/* The starting addresses of the sections. */
|
||||
obj_textsec (abfd)->vma = execp->a_tload;
|
||||
obj_datasec (abfd)->vma = execp->a_dload;
|
||||
|
||||
/* And reload the sizes, since the aout module zaps them. */
|
||||
obj_textsec (abfd)->size = execp->a_text;
|
||||
|
||||
bss_start = execp->a_dload + execp->a_data; /* BSS = end of data section. */
|
||||
obj_bsssec (abfd)->vma = align_power (bss_start, execp->a_balign);
|
||||
|
||||
/* The file positions of the sections. */
|
||||
obj_textsec (abfd)->filepos = execp->a_entry;
|
||||
obj_datasec (abfd)->filepos = execp->a_dload;
|
||||
|
||||
/* The file positions of the relocation info ***
|
||||
obj_textsec (abfd)->rel_filepos = N_TROFF (execp);
|
||||
obj_datasec (abfd)->rel_filepos = N_DROFF (execp); */
|
||||
|
||||
adata (abfd).page_size = 1; /* Not applicable. */
|
||||
adata (abfd).segment_size = 1;/* Not applicable. */
|
||||
adata (abfd).exec_bytes_size = MHCOM_BYTES_SIZE;
|
||||
|
||||
return abfd->xvec;
|
||||
}
|
||||
|
||||
static const bfd_target *
|
||||
os9k_object_p (bfd *abfd)
|
||||
{
|
||||
struct internal_exec anexec;
|
||||
mh_com exec_bytes;
|
||||
|
||||
if (bfd_bread (&exec_bytes, (bfd_size_type) MHCOM_BYTES_SIZE, abfd)
|
||||
!= MHCOM_BYTES_SIZE)
|
||||
{
|
||||
if (bfd_get_error () != bfd_error_system_call)
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return 0;
|
||||
}
|
||||
|
||||
anexec.a_info = H_GET_16 (abfd, exec_bytes.m_sync);
|
||||
if (N_BADMAG (&anexec))
|
||||
{
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (! os9k_swap_exec_header_in (abfd, &exec_bytes, &anexec))
|
||||
{
|
||||
if (bfd_get_error () != bfd_error_system_call)
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return NULL;
|
||||
}
|
||||
return aout_32_some_aout_object_p (abfd, &anexec, os9k_callback);
|
||||
}
|
||||
|
||||
static int
|
||||
os9k_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
struct bfd_link_info *info ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return sizeof (struct internal_exec);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define aout_32_close_and_cleanup aout_32_bfd_free_cached_info
|
||||
|
||||
#define aout_32_find_line _bfd_nosymbols_find_line
|
||||
#define aout_32_get_symbol_version_string \
|
||||
_bfd_nosymbols_get_symbol_version_string
|
||||
#define aout_32_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
|
||||
|
||||
#define aout_32_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
|
||||
#define aout_32_bfd_reloc_name_lookup _bfd_norelocs_bfd_reloc_name_lookup
|
||||
|
||||
#define aout_32_get_section_contents_in_window \
|
||||
_bfd_generic_get_section_contents_in_window
|
||||
|
||||
#define aout_32_set_reloc _bfd_generic_set_reloc
|
||||
|
||||
#define os9k_bfd_get_relocated_section_contents \
|
||||
bfd_generic_get_relocated_section_contents
|
||||
#define os9k_bfd_relax_section bfd_generic_relax_section
|
||||
#define os9k_bfd_gc_sections bfd_generic_gc_sections
|
||||
#define os9k_bfd_lookup_section_flags bfd_generic_lookup_section_flags
|
||||
#define os9k_bfd_merge_sections bfd_generic_merge_sections
|
||||
#define os9k_bfd_is_group_section bfd_generic_is_group_section
|
||||
#define os9k_bfd_discard_group bfd_generic_discard_group
|
||||
#define os9k_section_already_linked \
|
||||
_bfd_generic_section_already_linked
|
||||
#define os9k_bfd_define_common_symbol bfd_generic_define_common_symbol
|
||||
#define os9k_bfd_define_start_stop bfd_generic_define_start_stop
|
||||
#define os9k_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
|
||||
#define os9k_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
||||
#define os9k_bfd_link_just_syms _bfd_generic_link_just_syms
|
||||
#define os9k_bfd_copy_link_hash_symbol_type \
|
||||
_bfd_generic_copy_link_hash_symbol_type
|
||||
#define os9k_bfd_final_link _bfd_generic_final_link
|
||||
#define os9k_bfd_link_split_section _bfd_generic_link_split_section
|
||||
#define os9k_bfd_link_check_relocs _bfd_generic_link_check_relocs
|
||||
|
||||
const bfd_target i386_aout_os9k_vec =
|
||||
{
|
||||
"i386os9k", /* name */
|
||||
bfd_target_os9k_flavour,
|
||||
BFD_ENDIAN_LITTLE, /* data byte order is little */
|
||||
BFD_ENDIAN_LITTLE, /* hdr byte order is little */
|
||||
(HAS_RELOC | EXEC_P | WP_TEXT), /* object flags */
|
||||
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD), /* section flags */
|
||||
0, /* symbol leading char */
|
||||
' ', /* ar_pad_char */
|
||||
16, /* ar_max_namelen */
|
||||
0, /* match priority. */
|
||||
|
||||
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
||||
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
|
||||
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
|
||||
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
||||
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
|
||||
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
|
||||
{ /* bfd_check_format */
|
||||
_bfd_dummy_target,
|
||||
os9k_object_p,
|
||||
bfd_generic_archive_p,
|
||||
_bfd_dummy_target
|
||||
},
|
||||
{ /* bfd_set_format */
|
||||
_bfd_bool_bfd_false_error,
|
||||
_bfd_bool_bfd_false_error,
|
||||
_bfd_generic_mkarchive,
|
||||
_bfd_bool_bfd_false_error
|
||||
},
|
||||
{ /* bfd_write_contents */
|
||||
_bfd_bool_bfd_false_error,
|
||||
_bfd_bool_bfd_false_error,
|
||||
_bfd_write_archive_contents,
|
||||
_bfd_bool_bfd_false_error
|
||||
},
|
||||
|
||||
BFD_JUMP_TABLE_GENERIC (aout_32),
|
||||
BFD_JUMP_TABLE_COPY (_bfd_generic),
|
||||
BFD_JUMP_TABLE_CORE (_bfd_nocore),
|
||||
BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd),
|
||||
BFD_JUMP_TABLE_SYMBOLS (aout_32),
|
||||
BFD_JUMP_TABLE_RELOCS (aout_32),
|
||||
BFD_JUMP_TABLE_WRITE (aout_32),
|
||||
BFD_JUMP_TABLE_LINK (os9k),
|
||||
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
|
||||
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
};
|
@ -231,21 +231,14 @@ elfxx-tilegx.c
|
||||
elfxx-x86.c
|
||||
elfxx-x86.c
|
||||
format.c
|
||||
freebsd.h
|
||||
genlink.h
|
||||
go32stub.h
|
||||
hash.c
|
||||
hpux-core.c
|
||||
i386aout.c
|
||||
i386bsd.c
|
||||
i386dynix.c
|
||||
i386freebsd.c
|
||||
i386linux.c
|
||||
i386lynx.c
|
||||
i386mach3.c
|
||||
i386msdos.c
|
||||
i386netbsd.c
|
||||
i386os9k.c
|
||||
ihex.c
|
||||
init.c
|
||||
irix-core.c
|
||||
|
@ -650,13 +650,7 @@ extern const bfd_target hppa_elf64_linux_vec;
|
||||
extern const bfd_target hppa_som_vec;
|
||||
extern const bfd_target i386_aout_vec;
|
||||
extern const bfd_target i386_aout_bsd_vec;
|
||||
extern const bfd_target i386_aout_dynix_vec;
|
||||
extern const bfd_target i386_aout_fbsd_vec;
|
||||
extern const bfd_target i386_aout_linux_vec;
|
||||
extern const bfd_target i386_aout_lynx_vec;
|
||||
extern const bfd_target i386_aout_mach3_vec;
|
||||
extern const bfd_target i386_aout_nbsd_vec;
|
||||
extern const bfd_target i386_aout_os9k_vec;
|
||||
extern const bfd_target i386_coff_vec;
|
||||
extern const bfd_target i386_coff_go32_vec;
|
||||
extern const bfd_target i386_coff_go32stubbed_vec;
|
||||
@ -1014,22 +1008,7 @@ static const bfd_target * const _bfd_target_vector[] =
|
||||
|
||||
&i386_aout_vec,
|
||||
&i386_aout_bsd_vec,
|
||||
#if 0
|
||||
&i386_aout_dynix_vec,
|
||||
#endif
|
||||
&i386_aout_fbsd_vec,
|
||||
#if 0
|
||||
/* Since a.out files lack decent magic numbers, no way to recognize
|
||||
which kind of a.out file it is. */
|
||||
&i386_aout_linux_vec,
|
||||
#endif
|
||||
&i386_aout_lynx_vec,
|
||||
#if 0
|
||||
/* No distinguishing features for Mach 3 executables. */
|
||||
&i386_aout_mach3_vec,
|
||||
#endif
|
||||
&i386_aout_nbsd_vec,
|
||||
&i386_aout_os9k_vec,
|
||||
&i386_coff_vec,
|
||||
&i386_coff_go32_vec,
|
||||
&i386_coff_go32stubbed_vec,
|
||||
|
@ -1,3 +1,8 @@
|
||||
2018-04-18 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* testsuite/lib/binutils-common.exp: Remove support for assorted
|
||||
aout targets.
|
||||
|
||||
2018-04-17 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 23063
|
||||
|
@ -54,27 +54,18 @@ proc is_elf_format {} {
|
||||
return 0
|
||||
}
|
||||
|
||||
if { [istarget *-*-linux*aout*]
|
||||
|| [istarget *-*-linux*ecoff*]
|
||||
|| [istarget *-*-linux*oldld*]
|
||||
|| [istarget *-*-rtemscoff*]
|
||||
|| [istarget i?86-*-freebsd\[12\].*] } {
|
||||
if { [istarget *-*-linux*ecoff*]
|
||||
|| [istarget *-*-rtemscoff*] } {
|
||||
return 0
|
||||
}
|
||||
|
||||
if { ![istarget *-*-netbsdelf*]
|
||||
&& ( [istarget *-*-netbsd*aout*]
|
||||
|| [istarget *-*-netbsdpe*]
|
||||
|| [istarget arm*-*-netbsd*]
|
||||
|| [istarget i*86-*-netbsd*]
|
||||
|| [istarget vax-*-netbsd*]
|
||||
&& ( [istarget vax-*-netbsd*]
|
||||
|| [istarget ns32k-*-netbsd*]) } {
|
||||
return 0
|
||||
}
|
||||
|
||||
if { [istarget arm-*-openbsd*]
|
||||
|| [istarget i386-*-openbsd\[0-2\].*]
|
||||
|| [istarget i386-*-openbsd3.\[0-2\]]
|
||||
|| [istarget ns32k-*-openbsd*]
|
||||
|| [istarget vax-*-openbsd*] } {
|
||||
return 0
|
||||
@ -86,22 +77,13 @@ proc is_elf_format {} {
|
||||
# True if the object format is known to be a.out.
|
||||
#
|
||||
proc is_aout_format {} {
|
||||
if { [istarget *-*-*\[ab\]out*]
|
||||
|| [istarget *-*-linux*oldld*]
|
||||
if { [istarget *-*-*aout*]
|
||||
|| [istarget *-*-bsd*]
|
||||
|| [istarget *-*-msdos*]
|
||||
|| [istarget arm-*-netbsd*]
|
||||
|| [istarget arm-*-openbsd*]
|
||||
|| [istarget arm-*-riscix*]
|
||||
|| [istarget i?86-*-freebsd\[12\].*]
|
||||
|| [istarget i?86-*-netbsd*]
|
||||
|| [istarget i?86-*-openbsd\[0-2\]*]
|
||||
|| [istarget i?86-*-openbsd3.\[0-2\]*]
|
||||
|| [istarget i?86-*-vsta]
|
||||
|| [istarget i?86-*-mach*]
|
||||
|| [istarget ns32k-*-*]
|
||||
|| [istarget pdp11-*-*]
|
||||
|| [istarget vax-dec-ultrix*]
|
||||
|| [istarget vax-*-netbsd] } {
|
||||
return 1
|
||||
}
|
||||
|
@ -1,3 +1,18 @@
|
||||
2018-04-18 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2018-04-18 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* configure.tgt: Remove *-*-bsd* entry.
|
||||
|
@ -306,7 +306,6 @@ TARG_ENV_HFILES = \
|
||||
config/te-armfbsdeabi.h \
|
||||
config/te-armfbsdvfp.h \
|
||||
config/te-armlinuxeabi.h \
|
||||
config/te-dynix.h \
|
||||
config/te-freebsd.h \
|
||||
config/te-generic.h \
|
||||
config/te-gnu.h \
|
||||
@ -314,11 +313,9 @@ TARG_ENV_HFILES = \
|
||||
config/te-hppa.h \
|
||||
config/te-hppa64.h \
|
||||
config/te-hppalinux64.h \
|
||||
config/te-i386aix.h \
|
||||
config/te-ia64aix.h \
|
||||
config/te-interix.h \
|
||||
config/te-lynx.h \
|
||||
config/te-mach.h \
|
||||
config/te-macos.h \
|
||||
config/te-nbsd.h \
|
||||
config/te-nbsd532.h \
|
||||
|
@ -602,7 +602,6 @@ TARG_ENV_HFILES = \
|
||||
config/te-armfbsdeabi.h \
|
||||
config/te-armfbsdvfp.h \
|
||||
config/te-armlinuxeabi.h \
|
||||
config/te-dynix.h \
|
||||
config/te-freebsd.h \
|
||||
config/te-generic.h \
|
||||
config/te-gnu.h \
|
||||
@ -610,11 +609,9 @@ TARG_ENV_HFILES = \
|
||||
config/te-hppa.h \
|
||||
config/te-hppa64.h \
|
||||
config/te-hppalinux64.h \
|
||||
config/te-i386aix.h \
|
||||
config/te-ia64aix.h \
|
||||
config/te-interix.h \
|
||||
config/te-lynx.h \
|
||||
config/te-mach.h \
|
||||
config/te-macos.h \
|
||||
config/te-nbsd.h \
|
||||
config/te-nbsd532.h \
|
||||
|
@ -268,9 +268,6 @@
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define if defaulting to ELF on SCO 5. */
|
||||
#undef SCO_ELF
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at runtime.
|
||||
|
@ -2647,103 +2647,6 @@ elf_frob_file_after_relocs (void)
|
||||
#endif /* NEED_ECOFF_DEBUG */
|
||||
}
|
||||
|
||||
#ifdef SCO_ELF
|
||||
|
||||
/* Heavily plagiarized from obj_elf_version. The idea is to emit the
|
||||
SCO specific identifier in the .notes section to satisfy the SCO
|
||||
linker.
|
||||
|
||||
This looks more complicated than it really is. As opposed to the
|
||||
"obvious" solution, this should handle the cross dev cases
|
||||
correctly. (i.e, hosting on a 64 bit big endian processor, but
|
||||
generating SCO Elf code) Efficiency isn't a concern, as there
|
||||
should be exactly one of these sections per object module.
|
||||
|
||||
SCO OpenServer 5 identifies it's ELF modules with a standard ELF
|
||||
.note section.
|
||||
|
||||
int_32 namesz = 4 ; Name size
|
||||
int_32 descsz = 12 ; Descriptive information
|
||||
int_32 type = 1 ;
|
||||
char name[4] = "SCO" ; Originator name ALWAYS SCO + NULL
|
||||
int_32 version = (major ver # << 16) | version of tools ;
|
||||
int_32 source = (tool_id << 16 ) | 1 ;
|
||||
int_32 info = 0 ; These are set by the SCO tools, but we
|
||||
don't know enough about the source
|
||||
environment to set them. SCO ld currently
|
||||
ignores them, and recommends we set them
|
||||
to zero. */
|
||||
|
||||
#define SCO_MAJOR_VERSION 0x1
|
||||
#define SCO_MINOR_VERSION 0x1
|
||||
|
||||
void
|
||||
sco_id (void)
|
||||
{
|
||||
|
||||
char *name;
|
||||
unsigned int c;
|
||||
char ch;
|
||||
char *p;
|
||||
asection *seg = now_seg;
|
||||
subsegT subseg = now_subseg;
|
||||
Elf_Internal_Note i_note;
|
||||
Elf_External_Note e_note;
|
||||
asection *note_secp = NULL;
|
||||
int i, len;
|
||||
|
||||
/* create the .note section */
|
||||
|
||||
note_secp = subseg_new (".note", 0);
|
||||
bfd_set_section_flags (stdoutput,
|
||||
note_secp,
|
||||
SEC_HAS_CONTENTS | SEC_READONLY);
|
||||
|
||||
/* process the version string */
|
||||
|
||||
i_note.namesz = 4;
|
||||
i_note.descsz = 12; /* 12 descriptive bytes */
|
||||
i_note.type = NT_VERSION; /* Contains a version string */
|
||||
|
||||
p = frag_more (sizeof (i_note.namesz));
|
||||
md_number_to_chars (p, i_note.namesz, 4);
|
||||
|
||||
p = frag_more (sizeof (i_note.descsz));
|
||||
md_number_to_chars (p, i_note.descsz, 4);
|
||||
|
||||
p = frag_more (sizeof (i_note.type));
|
||||
md_number_to_chars (p, i_note.type, 4);
|
||||
|
||||
p = frag_more (4);
|
||||
strcpy (p, "SCO");
|
||||
|
||||
/* Note: this is the version number of the ELF we're representing */
|
||||
p = frag_more (4);
|
||||
md_number_to_chars (p, (SCO_MAJOR_VERSION << 16) | (SCO_MINOR_VERSION), 4);
|
||||
|
||||
/* Here, we pick a magic number for ourselves (yes, I "registered"
|
||||
it with SCO. The bottom bit shows that we are compat with the
|
||||
SCO ABI. */
|
||||
p = frag_more (4);
|
||||
md_number_to_chars (p, 0x4c520000 | 0x0001, 4);
|
||||
|
||||
/* If we knew (or cared) what the source language options were, we'd
|
||||
fill them in here. SCO has given us permission to ignore these
|
||||
and just set them to zero. */
|
||||
p = frag_more (4);
|
||||
md_number_to_chars (p, 0x0000, 4);
|
||||
|
||||
frag_align (2, 0, 0);
|
||||
|
||||
/* We probably can't restore the current segment, for there likely
|
||||
isn't one yet... */
|
||||
if (seg && subseg)
|
||||
subseg_set (seg, subseg);
|
||||
|
||||
}
|
||||
|
||||
#endif /* SCO_ELF */
|
||||
|
||||
static void
|
||||
elf_generate_asm_lineno (void)
|
||||
{
|
||||
|
@ -266,11 +266,6 @@ struct i386_tc_frag_data
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#ifdef SCO_ELF
|
||||
#define tc_init_after_args() sco_id ()
|
||||
extern void sco_id (void);
|
||||
#endif
|
||||
|
||||
#define WORKING_DOT_WORD 1
|
||||
|
||||
/* How to generate NOPs for .nop direct directive. */
|
||||
|
@ -1,26 +0,0 @@
|
||||
/* Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
GAS 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,
|
||||
or (at your option) any later version.
|
||||
|
||||
GAS 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 GAS; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
/* This is for i386-sequent-bsd. The assembler probably does not
|
||||
actually work, as the support in BFD is not complete as of this
|
||||
writing. See bfd/i386-dynix.c. */
|
||||
|
||||
#define TE_DYNIX 1
|
||||
|
||||
#include "obj-format.h"
|
@ -1,38 +0,0 @@
|
||||
/* Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
GAS 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,
|
||||
or (at your option) any later version.
|
||||
|
||||
GAS 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 GAS; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
/* This file is te-i386aix.h and is built from pieces of code from
|
||||
Minh Tran-Le <TRANLE@INTELLICORP.COM> by rich@cygnus.com. */
|
||||
|
||||
#define TE_I386AIX 1
|
||||
|
||||
#include "obj-format.h"
|
||||
|
||||
/* Define KEEP_RELOC_INFO so that the strip reloc info flag F_RELFLG is
|
||||
not used in the filehdr for COFF output. */
|
||||
#define KEEP_RELOC_INFO
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* comment-column: 0
|
||||
* fill-column: 79
|
||||
* End:
|
||||
*/
|
||||
|
||||
/* end of te-i386aix.h */
|
@ -1,21 +0,0 @@
|
||||
/* Copyright (C) 2007-2018 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
||||
GAS 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,
|
||||
or (at your option) any later version.
|
||||
|
||||
GAS 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 GAS; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
#define TE_Mach
|
||||
#include "obj-format.h"
|
8
gas/configure
vendored
8
gas/configure
vendored
@ -12223,14 +12223,6 @@ _ACEOF
|
||||
|
||||
generic_target=${cpu_type}-${target_vendor}-${target_os}
|
||||
case ${generic_target} in
|
||||
i386-*-sco3.2v5*)
|
||||
if test ${this_target} = $target; then
|
||||
|
||||
$as_echo "#define SCO_ELF 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
;;
|
||||
|
||||
i386-*-msdosdjgpp* \
|
||||
| i386-*-go32* \
|
||||
| i386-go32-rtems*)
|
||||
|
@ -190,12 +190,6 @@ for this_target in $target $canon_targets ; do
|
||||
|
||||
generic_target=${cpu_type}-${target_vendor}-${target_os}
|
||||
case ${generic_target} in
|
||||
i386-*-sco3.2v5*)
|
||||
if test ${this_target} = $target; then
|
||||
AC_DEFINE(SCO_ELF, 1, [Define if defaulting to ELF on SCO 5.])
|
||||
fi
|
||||
;;
|
||||
|
||||
i386-*-msdosdjgpp* \
|
||||
| i386-*-go32* \
|
||||
| i386-go32-rtems*)
|
||||
|
@ -212,11 +212,8 @@ case ${generic_target} in
|
||||
h8300-*-elf) fmt=elf ;;
|
||||
h8300-*-linux*) fmt=elf em=linux ;;
|
||||
|
||||
i386-ibm-aix*) fmt=coff em=i386aix ;;
|
||||
i386-sequent-bsd*) fmt=aout em=dynix ;;
|
||||
i386-*-beospe*) fmt=coff em=pe ;;
|
||||
i386-*-beos*) fmt=elf ;;
|
||||
i386-*-coff) fmt=coff ;;
|
||||
i386-*-elfiamcu) fmt=elf arch=iamcu ;;
|
||||
i386-*-elf*) fmt=elf ;;
|
||||
i386-*-fuchsia*) fmt=elf ;;
|
||||
@ -226,45 +223,23 @@ case ${generic_target} in
|
||||
case ${cpu} in
|
||||
x86_64*) arch=x86_64:32 ;;
|
||||
esac ;;
|
||||
i386-*-netbsd0.8) fmt=aout em=386bsd ;;
|
||||
i386-*-netbsdpe*) fmt=coff em=pe ;;
|
||||
i386-*-netbsd*-gnu* | \
|
||||
i386-*-knetbsd*-gnu | \
|
||||
i386-*-netbsdelf*) fmt=elf em=nbsd ;;
|
||||
i386-*-netbsd*)
|
||||
case ${cpu} in
|
||||
x86_64) fmt=elf em=nbsd ;;
|
||||
*) fmt=aout em=nbsd ;;
|
||||
esac ;;
|
||||
i386-*-openbsd[0-2].* | \
|
||||
i386-*-openbsd3.[0-2]) fmt=aout em=nbsd ;;
|
||||
i386-*-netbsd* | \
|
||||
i386-*-openbsd*) fmt=elf em=nbsd ;;
|
||||
i386-*-linux*aout*) fmt=aout em=linux ;;
|
||||
i386-*-linux*oldld) fmt=aout em=linux ;;
|
||||
i386-*-linux*coff*) fmt=coff em=linux ;;
|
||||
i386-*-linux-*) fmt=elf em=linux
|
||||
case ${cpu}-${os} in
|
||||
x86_64*-linux-gnux32) arch=x86_64:32 ;;
|
||||
esac ;;
|
||||
i386-*-lynxos*) fmt=elf em=lynx ;;
|
||||
i386-*-redox*) fmt=elf ;;
|
||||
i386-*-sysv[45]*) fmt=elf ;;
|
||||
i386-*-solaris*) fmt=elf em=solaris ;;
|
||||
i386-*-freebsdaout*) fmt=aout em=386bsd ;;
|
||||
i386-*-freebsd[12].*) fmt=aout em=386bsd ;;
|
||||
i386-*-freebsd[12]) fmt=aout em=386bsd ;;
|
||||
i386-*-freebsd* \
|
||||
| i386-*-kfreebsd*-gnu) fmt=elf em=freebsd ;;
|
||||
i386-*-sysv*) fmt=coff ;;
|
||||
i386-*-sco3.2v5*coff) fmt=coff ;;
|
||||
i386-*-isc*) fmt=coff ;;
|
||||
i386-*-sco3.2v5*) fmt=elf ;;
|
||||
i386-*-sco3.2*) fmt=coff ;;
|
||||
i386-*-vsta) fmt=aout ;;
|
||||
i386-*-msdosdjgpp* \
|
||||
| i386-*-go32*) fmt=coff em=go32 ;;
|
||||
i386-*-gnu*) fmt=elf em=gnu ;;
|
||||
i386-*-mach*) fmt=aout em=mach ;;
|
||||
i386-*-msdos*) fmt=aout ;;
|
||||
i386-*-moss*) fmt=elf ;;
|
||||
i386-*-pe) fmt=coff em=pe ;;
|
||||
|
@ -181,7 +181,6 @@ config/te-armeabi.h
|
||||
config/te-armfbsdeabi.h
|
||||
config/te-armfbsdvfp.h
|
||||
config/te-armlinuxeabi.h
|
||||
config/te-dynix.h
|
||||
config/te-freebsd.h
|
||||
config/te-generic.h
|
||||
config/te-gnu.h
|
||||
@ -189,11 +188,9 @@ config/te-go32.h
|
||||
config/te-hppa.h
|
||||
config/te-hppa64.h
|
||||
config/te-hppalinux64.h
|
||||
config/te-i386aix.h
|
||||
config/te-ia64aix.h
|
||||
config/te-interix.h
|
||||
config/te-lynx.h
|
||||
config/te-mach.h
|
||||
config/te-macos.h
|
||||
config/te-nbsd.h
|
||||
config/te-nbsd532.h
|
||||
|
@ -1,3 +1,7 @@
|
||||
2018-04-18 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* aout/dynix3.h: Delete.
|
||||
|
||||
2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
|
||||
|
||||
Microblaze Target: PIC data text relative
|
||||
|
@ -1,87 +0,0 @@
|
||||
/* a.out specifics for Sequent Symmetry running Dynix 3.x
|
||||
|
||||
Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
||||
|
||||
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. */
|
||||
|
||||
#ifndef A_OUT_DYNIX3_H
|
||||
#define A_OUT_DYNIX3_H
|
||||
|
||||
#define external_exec dynix_external_exec
|
||||
|
||||
/* struct exec for Dynix 3
|
||||
|
||||
a_gdtbl and a_bootstrap are only for standalone binaries.
|
||||
Shared data fields are not supported by the kernel as of Dynix 3.1,
|
||||
but are supported by Dynix compiler programs. */
|
||||
struct dynix_external_exec
|
||||
{
|
||||
unsigned char e_info[4];
|
||||
unsigned char e_text[4];
|
||||
unsigned char e_data[4];
|
||||
unsigned char e_bss[4];
|
||||
unsigned char e_syms[4];
|
||||
unsigned char e_entry[4];
|
||||
unsigned char e_trsize[4];
|
||||
unsigned char e_drsize[4];
|
||||
unsigned char e_g_code[8];
|
||||
unsigned char e_g_data[8];
|
||||
unsigned char e_g_desc[8];
|
||||
unsigned char e_shdata[4];
|
||||
unsigned char e_shbss[4];
|
||||
unsigned char e_shdrsize[4];
|
||||
unsigned char e_bootstrap[44];
|
||||
unsigned char e_reserved[12];
|
||||
unsigned char e_version[4];
|
||||
};
|
||||
|
||||
#define EXEC_BYTES_SIZE (128)
|
||||
|
||||
/* All executables under Dynix are demand paged with read-only text,
|
||||
Thus no NMAGIC.
|
||||
|
||||
ZMAGIC has a page of 0s at virtual 0,
|
||||
XMAGIC has an invalid page at virtual 0. */
|
||||
#define OMAGIC 0x12eb /* .o */
|
||||
#define ZMAGIC 0x22eb /* zero @ 0, demand load */
|
||||
#define XMAGIC 0x32eb /* invalid @ 0, demand load */
|
||||
#define SMAGIC 0x42eb /* standalone, not supported here */
|
||||
|
||||
#define N_BADMAG(x) ((OMAGIC != N_MAGIC(x)) && \
|
||||
(ZMAGIC != N_MAGIC(x)) && \
|
||||
(XMAGIC != N_MAGIC(x)) && \
|
||||
(SMAGIC != N_MAGIC(x)))
|
||||
|
||||
#define N_ADDRADJ(x) ((ZMAGIC == N_MAGIC(x) || XMAGIC == N_MAGIC(x)) ? 0x1000 : 0)
|
||||
|
||||
#define N_TXTOFF(x) (EXEC_BYTES_SIZE)
|
||||
#define N_DATOFF(x) (N_TXTOFF(x) + N_TXTSIZE(x))
|
||||
#define N_SHDATOFF(x) (N_DATOFF(x) + (x)->a_data)
|
||||
#define N_TRELOFF(x) (N_SHDATOFF(x) + (x)->a_shdata)
|
||||
#define N_DRELOFF(x) (N_TRELOFF(x) + (x)->a_trsize)
|
||||
#define N_SHDRELOFF(x) (N_DRELOFF(x) + (x)->a_drsize)
|
||||
#define N_SYMOFF(x) (N_SHDRELOFF(x) + (x)->a_shdrsize)
|
||||
#define N_STROFF(x) (N_SYMOFF(x) + (x)->a_syms)
|
||||
|
||||
#define N_TXTADDR(x) \
|
||||
(((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? 0 \
|
||||
: TEXT_START_ADDR + EXEC_BYTES_SIZE)
|
||||
|
||||
#define N_TXTSIZE(x) \
|
||||
(((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? ((x)->a_text) \
|
||||
: ((x)->a_text - N_ADDRADJ(x) - EXEC_BYTES_SIZE))
|
||||
|
||||
#endif /* A_OUT_DYNIX3_H */
|
37
ld/ChangeLog
37
ld/ChangeLog
@ -1,3 +1,40 @@
|
||||
2018-04-18 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
|
||||
|
||||
Microblaze Target: PIC data text relative
|
||||
|
@ -305,17 +305,12 @@ ALL_EMULATION_SOURCES = \
|
||||
ehppalinux.c \
|
||||
ehppanbsd.c \
|
||||
ehppaobsd.c \
|
||||
ei386aout.c \
|
||||
ei386beos.c \
|
||||
ei386bsd.c \
|
||||
ei386coff.c \
|
||||
ei386go32.c \
|
||||
ei386linux.c \
|
||||
ei386lynx.c \
|
||||
ei386mach.c \
|
||||
ei386moss.c \
|
||||
ei386msdos.c \
|
||||
ei386nbsd.c \
|
||||
ei386nto.c \
|
||||
ei386pe.c \
|
||||
ei386pe_posix.c \
|
||||
@ -381,7 +376,6 @@ ALL_EMULATION_SOURCES = \
|
||||
ev850_rh850.c \
|
||||
evanilla.c \
|
||||
evaxnbsd.c \
|
||||
evsta.c \
|
||||
exgateelf.c \
|
||||
ez80.c \
|
||||
ez8001.c \
|
||||
@ -1362,39 +1356,24 @@ ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386beos.c: $(srcdir)/emulparams/i386beos.sh \
|
||||
$(srcdir)/emultempl/beos.em $(srcdir)/scripttempl/i386beos.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386coff.c: $(srcdir)/emulparams/i386coff.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386go32.c: $(srcdir)/emulparams/i386go32.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386go32.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386linux.c: $(srcdir)/emulparams/i386linux.sh \
|
||||
$(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
|
||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
|
||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386nbsd.c: $(srcdir)/emulparams/i386nbsd.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386nto.c: $(srcdir)/emulparams/i386nto.sh \
|
||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
@ -1673,9 +1652,6 @@ evanilla.c: $(srcdir)/emulparams/vanilla.sh \
|
||||
evaxnbsd.c: $(srcdir)/emulparams/vaxnbsd.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
evsta.c: $(srcdir)/emulparams/vsta.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
exgateelf.c: $(srcdir)/emulparams/xgateelf.sh \
|
||||
$(srcdir)/emultempl/generic.em $(ELF_DEPS) \
|
||||
$(srcdir)/scripttempl/elfxgate.sc ${GEN_DEPENDS}
|
||||
|
@ -674,17 +674,12 @@ ALL_EMULATION_SOURCES = \
|
||||
ehppalinux.c \
|
||||
ehppanbsd.c \
|
||||
ehppaobsd.c \
|
||||
ei386aout.c \
|
||||
ei386beos.c \
|
||||
ei386bsd.c \
|
||||
ei386coff.c \
|
||||
ei386go32.c \
|
||||
ei386linux.c \
|
||||
ei386lynx.c \
|
||||
ei386mach.c \
|
||||
ei386moss.c \
|
||||
ei386msdos.c \
|
||||
ei386nbsd.c \
|
||||
ei386nto.c \
|
||||
ei386pe.c \
|
||||
ei386pe_posix.c \
|
||||
@ -750,7 +745,6 @@ ALL_EMULATION_SOURCES = \
|
||||
ev850_rh850.c \
|
||||
evanilla.c \
|
||||
evaxnbsd.c \
|
||||
evsta.c \
|
||||
exgateelf.c \
|
||||
ez80.c \
|
||||
ez8001.c \
|
||||
@ -1288,17 +1282,12 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ehppalinux.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ehppanbsd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ehppaobsd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386aout.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386beos.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386bsd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386coff.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386go32.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386linux.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386lynx.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386mach.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386moss.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386msdos.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386nbsd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386nto.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386pe.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ei386pe_posix.Po@am__quote@
|
||||
@ -1367,7 +1356,6 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ev850_rh850.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evanilla.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evaxnbsd.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evsta.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exgateelf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ez80.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ez8001.Po@am__quote@
|
||||
@ -2872,39 +2860,24 @@ ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386beos.c: $(srcdir)/emulparams/i386beos.sh \
|
||||
$(srcdir)/emultempl/beos.em $(srcdir)/scripttempl/i386beos.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386bsd.c: $(srcdir)/emulparams/i386bsd.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386coff.c: $(srcdir)/emulparams/i386coff.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386coff.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386go32.c: $(srcdir)/emulparams/i386go32.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386go32.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386linux.c: $(srcdir)/emulparams/i386linux.sh \
|
||||
$(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
|
||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
|
||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386nbsd.c: $(srcdir)/emulparams/i386nbsd.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
ei386nto.c: $(srcdir)/emulparams/i386nto.sh \
|
||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
@ -3183,9 +3156,6 @@ evanilla.c: $(srcdir)/emulparams/vanilla.sh \
|
||||
evaxnbsd.c: $(srcdir)/emulparams/vaxnbsd.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
evsta.c: $(srcdir)/emulparams/vsta.sh \
|
||||
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
exgateelf.c: $(srcdir)/emulparams/xgateelf.sh \
|
||||
$(srcdir)/emultempl/generic.em $(ELF_DEPS) \
|
||||
$(srcdir)/scripttempl/elfxgate.sc ${GEN_DEPENDS}
|
||||
|
@ -232,14 +232,9 @@ hppa*-*-netbsd*) targ_emul=hppanbsd ;;
|
||||
hppa*-*-openbsd*) targ_emul=hppaobsd
|
||||
;;
|
||||
i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;;
|
||||
i[3-7]86-*-vsta) targ_emul=vsta ;;
|
||||
i[3-7]86-*-go32) targ_emul=i386go32 ;;
|
||||
i[3-7]86-*-msdosdjgpp*) targ_emul=i386go32 ;;
|
||||
i[3-7]86-*-aix*) targ_emul=i386coff ;;
|
||||
i[3-7]86-*-sco*) targ_emul=i386coff ;;
|
||||
i[3-7]86-*-isc*) targ_emul=i386coff ;;
|
||||
i[3-7]86-*-lynxos*) targ_emul=i386lynx ;;
|
||||
i[3-7]86-*-coff) targ_emul=i386coff ;;
|
||||
i[3-7]86-*-aros*) targ_emul=elf_i386
|
||||
targ_extra_emuls=elf_iamcu ;;
|
||||
i[3-7]86-*-rdos*) targ_emul=elf_i386
|
||||
@ -249,28 +244,18 @@ x86_64-*-cloudabi*) targ_emul=elf_x86_64_cloudabi ;;
|
||||
i[3-7]86-*-bsd) targ_emul=i386bsd ;;
|
||||
i[3-7]86-*-bsd386) targ_emul=i386bsd ;;
|
||||
i[3-7]86-*-bsdi*) targ_emul=i386bsd ;;
|
||||
i[3-7]86-*-aout) targ_emul=i386aout ;;
|
||||
i[3-7]86-*-linux*aout*) targ_emul=i386linux
|
||||
targ_extra_emuls="elf_i386 elf_iamcu"
|
||||
tdir_elf_iamcu=`echo ${targ_alias} | sed -e 's/aout//'`
|
||||
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` ;;
|
||||
i[3-7]86-*-linux*oldld) targ_emul=i386linux
|
||||
targ_extra_emuls="elf_i386 elf_iamcu" ;;
|
||||
i[3-7]86-*-linux-*) targ_emul=elf_i386
|
||||
targ_extra_emuls="i386linux elf_iamcu"
|
||||
targ_extra_emuls="elf_iamcu"
|
||||
targ64_extra_emuls="elf_x86_64 elf32_x86_64 elf_l1om elf_k1om"
|
||||
targ64_extra_libpath="elf_x86_64 elf32_x86_64"
|
||||
tdir_i386linux=${targ_alias}aout ;;
|
||||
targ64_extra_libpath="elf_x86_64 elf32_x86_64" ;;
|
||||
x86_64-*-linux-gnux32) targ_emul=elf32_x86_64
|
||||
targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu i386linux elf_l1om elf_k1om"
|
||||
targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om"
|
||||
targ_extra_libpath="elf_i386 elf_iamcu elf_x86_64 elf_l1om elf_k1om"
|
||||
tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
|
||||
tdir_elf_iamcu=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'`
|
||||
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/' -e 's/-linux-gnux32/-linux-gnu/'` ;;
|
||||
x86_64-*-linux-*) targ_emul=elf_x86_64
|
||||
targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu i386linux elf_l1om elf_k1om"
|
||||
targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om"
|
||||
targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om"
|
||||
tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
|
||||
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
|
||||
i[3-7]86-*-redox*) targ_emul=elf_i386
|
||||
targ_extra_emuls=elf_x86_64 ;;
|
||||
@ -297,13 +282,11 @@ i[3-7]86-*-netbsdelf* | \
|
||||
i[3-7]86-*-netbsd*-gnu* | \
|
||||
i[3-7]86-*-knetbsd*-gnu)
|
||||
targ_emul=elf_i386
|
||||
targ_extra_emuls="elf_iamcu i386nbsd" ;;
|
||||
targ_extra_emuls="elf_iamcu" ;;
|
||||
i[3-7]86-*-netbsdpe*) targ_emul=i386pe
|
||||
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
|
||||
i[3-7]86-*-netbsd*) targ_emul=i386nbsd
|
||||
targ_extra_emuls=elf_i386 ;;
|
||||
x86_64-*-netbsd*) targ_emul=elf_x86_64
|
||||
targ_extra_emuls="elf_i386 elf_iamcu i386nbsd elf_l1om elf_k1om"
|
||||
targ_extra_emuls="elf_i386 elf_iamcu elf_l1om elf_k1om"
|
||||
tdir_elf_iamcu=`echo ${targ_alias} | \
|
||||
sed -e 's/x86_64/i386/'`
|
||||
case "${tdir_elf_iamcu}" in
|
||||
@ -330,8 +313,6 @@ x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia*)
|
||||
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
|
||||
;;
|
||||
i[3-7]86-*-kaos*) targ_emul=elf_i386 ;;
|
||||
i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12])
|
||||
targ_emul=i386bsd ;;
|
||||
i[3-7]86-*-dragonfly*) targ_emul=elf_i386
|
||||
targ_extra_emuls="elf_iamcu i386bsd" ;;
|
||||
x86_64-*-dragonfly*) targ_emul=elf_x86_64
|
||||
@ -349,9 +330,6 @@ x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
|
||||
| sed -e 's/x86_64/i386/'`
|
||||
tdir_elf_i386=`echo ${targ_alias} \
|
||||
| sed -e 's/x86_64/i386/'` ;;
|
||||
i[3-7]86-*-sysv*) targ_emul=i386coff ;;
|
||||
i[3-7]86-*-ptx*) targ_emul=i386coff ;;
|
||||
i[3-7]86-*-mach*) targ_emul=i386mach ;;
|
||||
i[3-7]86-*-gnu*) targ_emul=elf_i386
|
||||
targ_extra_emuls=elf_iamcu ;;
|
||||
i[3-7]86-*-msdos*) targ_emul=i386msdos; targ_extra_emuls=i386aout ;;
|
||||
|
@ -1,5 +0,0 @@
|
||||
SCRIPT_NAME=i386coff
|
||||
OUTPUT_FORMAT="coff-i386"
|
||||
TEXT_START_ADDR=0x1000000
|
||||
TARGET_PAGE_SIZE=0x1000000
|
||||
ARCH=i386
|
@ -1,9 +0,0 @@
|
||||
SCRIPT_NAME=aout
|
||||
OUTPUT_FORMAT="a.out-i386-linux"
|
||||
TARGET_PAGE_SIZE=0x1000
|
||||
TEXT_START_ADDR=0x1020
|
||||
case ${LD_FLAG} in
|
||||
n|N) TEXT_START_ADDR=0 ;;
|
||||
esac
|
||||
ARCH=i386
|
||||
TEMPLATE_NAME=linux
|
@ -1,9 +0,0 @@
|
||||
SCRIPT_NAME=aout
|
||||
OUTPUT_FORMAT="a.out-mach3"
|
||||
TEXT_START_ADDR=0x10020
|
||||
case ${LD_FLAG} in
|
||||
n|N) TEXT_START_ADDR=0x10000 ;;
|
||||
esac
|
||||
SEGMENT_SIZE=0x1000
|
||||
PAD_TEXT=t
|
||||
ARCH=i386
|
@ -1,6 +0,0 @@
|
||||
SCRIPT_NAME=aout
|
||||
TEXT_START_ADDR=0x1020
|
||||
OUTPUT_FORMAT="a.out-i386-netbsd"
|
||||
TARGET_PAGE_SIZE=0x1000
|
||||
ARCH=i386
|
||||
EXECUTABLE_SYMBOLS='__DYNAMIC = 0;'
|
@ -1,10 +0,0 @@
|
||||
SCRIPT_NAME=aout
|
||||
OUTPUT_FORMAT="a.out-i386"
|
||||
TEXT_START_ADDR=0x1020
|
||||
TARGET_PAGE_SIZE=0x1000
|
||||
SEGMENT_SIZE=0x400000
|
||||
case ${LD_FLAG} in
|
||||
n|N) TEXT_START_ADDR=0 ;;
|
||||
esac
|
||||
ARCH=i386
|
||||
|
@ -220,17 +220,12 @@ ehppaelf.c
|
||||
ehppalinux.c
|
||||
ehppanbsd.c
|
||||
ehppaobsd.c
|
||||
ei386aout.c
|
||||
ei386beos.c
|
||||
ei386bsd.c
|
||||
ei386coff.c
|
||||
ei386go32.c
|
||||
ei386linux.c
|
||||
ei386lynx.c
|
||||
ei386mach.c
|
||||
ei386moss.c
|
||||
ei386msdos.c
|
||||
ei386nbsd.c
|
||||
ei386nto.c
|
||||
ei386pe.c
|
||||
ei386pe_posix.c
|
||||
@ -299,7 +294,6 @@ ev850.c
|
||||
ev850_rh850.c
|
||||
evanilla.c
|
||||
evaxnbsd.c
|
||||
evsta.c
|
||||
exgateelf.c
|
||||
ez80.c
|
||||
ez8001.c
|
||||
|
@ -1,57 +0,0 @@
|
||||
# Linker script for 386 COFF. This works on SVR3.2 and SCO Unix 3.2.2.
|
||||
# Ian Taylor <ian@cygnus.com>.
|
||||
#
|
||||
# Copyright (C) 2014-2018 Free Software Foundation, Inc.
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification,
|
||||
# are permitted in any medium without royalty provided the copyright
|
||||
# notice and this notice are preserved.
|
||||
|
||||
test -z "$ENTRY" && ENTRY=_start
|
||||
# These are substituted in as variables in order to get '}' in a shell
|
||||
# conditional expansion.
|
||||
INIT='.init : { *(.init) }'
|
||||
FINI='.fini : { *(.fini) }'
|
||||
|
||||
cat <<EOF
|
||||
/* Copyright (C) 2014-2018 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this script, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. */
|
||||
|
||||
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
|
||||
${LIB_SEARCH_DIRS}
|
||||
|
||||
${RELOCATING+ENTRY (${ENTRY})}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text ${RELOCATING+ SIZEOF_HEADERS} : {
|
||||
${RELOCATING+ *(.init)}
|
||||
*(.text)
|
||||
${RELOCATING+ *(.fini)}
|
||||
${RELOCATING+ etext = .};
|
||||
}
|
||||
.data ${RELOCATING+ 0x400000 + (. & 0xffc00fff)} : {
|
||||
*(.data)
|
||||
${RELOCATING+ edata = .};
|
||||
}
|
||||
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
|
||||
{
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
${RELOCATING+ end = .};
|
||||
}
|
||||
${RELOCATING- ${INIT}}
|
||||
${RELOCATING- ${FINI}}
|
||||
.stab 0 ${RELOCATING+(NOLOAD)} :
|
||||
{
|
||||
[ .stab ]
|
||||
}
|
||||
.stabstr 0 ${RELOCATING+(NOLOAD)} :
|
||||
{
|
||||
[ .stabstr ]
|
||||
}
|
||||
}
|
||||
EOF
|
@ -33,11 +33,6 @@ if { ![istarget *-*-linux*]
|
||||
return
|
||||
}
|
||||
|
||||
if { [istarget *-*-linux*aout*]
|
||||
|| [istarget *-*-linux*oldld*] } {
|
||||
return
|
||||
}
|
||||
|
||||
load_lib ld-lib.exp
|
||||
|
||||
set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
|
||||
|
@ -29,11 +29,6 @@ if { ![istarget *-*-linux*]
|
||||
return
|
||||
}
|
||||
|
||||
if { [istarget *-*-linux*aout*]
|
||||
|| [istarget *-*-linux*oldld*] } {
|
||||
return
|
||||
}
|
||||
|
||||
# The optional test_name argument provides a mechanism for the caller
|
||||
# to hardwire the test name. This is important if ld_options contains
|
||||
# absolute path names because the default test name is constructed
|
||||
@ -166,10 +161,8 @@ binutils_test strip "-z relro -shared" relro1
|
||||
binutils_test objcopy "-z relro" relro1
|
||||
binutils_test objcopy "-z relro -shared" relro1
|
||||
if { ([istarget "i?86-*-elf*"]
|
||||
|| (([istarget "i?86-*-linux*"]
|
||||
|| [istarget "i?86-*-gnu*"])
|
||||
&& ![istarget "*-*-*aout*"]
|
||||
&& ![istarget "*-*-*oldld*"])
|
||||
|| [istarget "i?86-*-linux*"]
|
||||
|| [istarget "i?86-*-gnu*"]
|
||||
|| [istarget "x86_64-*-linux*"]
|
||||
|| [istarget "amd64-*-linux*"]
|
||||
|| [istarget "i?86-*nacl*"]
|
||||
|
@ -27,11 +27,6 @@ if { ![istarget *-*-linux*]
|
||||
return
|
||||
}
|
||||
|
||||
if { [istarget *-*-linux*aout*]
|
||||
|| [istarget *-*-linux*oldld*] } {
|
||||
return
|
||||
}
|
||||
|
||||
# Check to see if the C compiler works.
|
||||
if { [which $CC] == 0 } {
|
||||
return
|
||||
|
@ -29,11 +29,6 @@ if { ![istarget *-*-linux*]
|
||||
return
|
||||
}
|
||||
|
||||
if { [istarget *-*-linux*aout*]
|
||||
|| [istarget *-*-linux*oldld*] } {
|
||||
return
|
||||
}
|
||||
|
||||
global as
|
||||
global ld
|
||||
global READELF
|
||||
|
@ -59,11 +59,6 @@ if { ![istarget hppa*64*-*-hpux*]
|
||||
return
|
||||
}
|
||||
|
||||
if { [istarget *-*-linux*aout*]
|
||||
|| [istarget *-*-linux*oldld*] } {
|
||||
return
|
||||
}
|
||||
|
||||
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
|
||||
return
|
||||
}
|
||||
|
@ -49,11 +49,6 @@ if { ![istarget hppa*64*-*-hpux*] \
|
||||
return
|
||||
}
|
||||
|
||||
if { [istarget *-*-linux*aout*] \
|
||||
|| [istarget *-*-linux*oldld*] } {
|
||||
return
|
||||
}
|
||||
|
||||
set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
|
||||
foreach t $test_list {
|
||||
# We need to strip the ".d", but can leave the dirname.
|
||||
|
@ -55,12 +55,6 @@ if { ![istarget alpha*-*-linux*]
|
||||
&& ![istarget *-*-nacl*] } {
|
||||
return
|
||||
}
|
||||
|
||||
if { [istarget *-*-linux*aout*]
|
||||
|| [istarget *-*-linux*oldld*] } {
|
||||
return
|
||||
}
|
||||
|
||||
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
|
||||
return
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
#ld: --gc-sections -e _start
|
||||
#readelf: -S --wide
|
||||
#target: *-*-linux* *-*-gnu*
|
||||
#notarget: *-*-*aout *-*-*oldld
|
||||
|
||||
#...
|
||||
.* .note.ABI-tag[ ]+NOTE.*
|
||||
|
@ -3,7 +3,7 @@
|
||||
#ld: --gc-sections -e _start
|
||||
#objdump: -s -j _foo
|
||||
#target: *-*-linux* *-*-gnu*
|
||||
#notarget: *-*-*aout *-*-*oldld frv-*-linux* metag-*-linux*
|
||||
#notarget: frv-*-linux* metag-*-linux*
|
||||
|
||||
#...
|
||||
Contents of section _foo:
|
||||
|
@ -2,8 +2,7 @@
|
||||
#ld: --gc-sections -e _start tmpdir/pr20022.so
|
||||
#readelf: -SsW
|
||||
#target: *-*-linux* *-*-gnu*
|
||||
#notarget: *-*-*aout *-*-*oldld frv-*-linux* metag-*-linux*
|
||||
#notarget: mips*-*-*
|
||||
#notarget: frv-*-linux* metag-*-linux* mips*-*-*
|
||||
# Skip on targets without dynamic relocations in .text section.
|
||||
|
||||
#...
|
||||
|
@ -2,7 +2,7 @@
|
||||
#ld: --gc-sections -e _start
|
||||
#nm: -n
|
||||
#target: *-*-linux* *-*-gnu*
|
||||
#notarget: *-*-*aout *-*-*oldld frv-*-linux* metag-*-linux*
|
||||
#notarget: frv-*-linux* metag-*-linux*
|
||||
|
||||
#...
|
||||
[0-9a-f]+ D +__start__foo
|
||||
|
@ -2,7 +2,7 @@
|
||||
#ld: --gc-sections -e _start
|
||||
#nm: -n
|
||||
#target: *-*-linux* *-*-gnu*
|
||||
#notarget: *-*-*aout *-*-*oldld frv-*-linux* metag-*-linux*
|
||||
#notarget: frv-*-linux* metag-*-linux*
|
||||
|
||||
#failif
|
||||
#...
|
||||
|
@ -99,10 +99,8 @@ if [istarget "*-*-go32*"] {
|
||||
}
|
||||
|
||||
if { !([istarget "i?86-*-elf*"]
|
||||
|| (([istarget "i?86-*-linux*"]
|
||||
|| [istarget "i?86-*-gnu*"])
|
||||
&& ![istarget "*-*-*aout*"]
|
||||
&& ![istarget "*-*-*oldld*"])
|
||||
|| [istarget "i?86-*-linux*"]
|
||||
|| [istarget "i?86-*-gnu*"]
|
||||
|| [istarget "i?86-*-nacl*"]
|
||||
|| [istarget "x86_64-*-nacl*"]
|
||||
|| [istarget "x86_64-*-linux*"]
|
||||
|
@ -25,10 +25,8 @@
|
||||
# STT_GNU_IFUNC symbols.
|
||||
|
||||
if { !([istarget "i?86-*-elf*"]
|
||||
|| (([istarget "i?86-*-linux*"]
|
||||
|| [istarget "i?86-*-gnu*"])
|
||||
&& ![istarget "*-*-*aout*"]
|
||||
&& ![istarget "*-*-*oldld*"])
|
||||
|| [istarget "i?86-*-linux*"]
|
||||
|| [istarget "i?86-*-gnu*"]
|
||||
|| [istarget "i?86-*-nacl*"]
|
||||
|| [istarget "x86_64-*-nacl*"]
|
||||
|| [istarget "x86_64-*-linux*"]
|
||||
|
@ -33,10 +33,8 @@ if {!(([istarget "i?86-*-*"]
|
||||
|| [istarget "s390*-*-*"])
|
||||
&& ([istarget "*-*-elf*"]
|
||||
|| [istarget "*-*-nacl*"]
|
||||
|| (([istarget "*-*-linux*"]
|
||||
|| [istarget "*-*-gnu*"])
|
||||
&& ![istarget "*-*-*aout*"]
|
||||
&& ![istarget "*-*-*oldld*"]))) } {
|
||||
|| [istarget "*-*-linux*"]
|
||||
|| [istarget "*-*-gnu*"])) } {
|
||||
verbose "IFUNC tests not run - target does not support IFUNC"
|
||||
return
|
||||
}
|
||||
|
@ -32,11 +32,6 @@ if { ![istarget *-*-linux*] \
|
||||
return
|
||||
}
|
||||
|
||||
if { [istarget *-*-linux*aout*] \
|
||||
|| [istarget *-*-linux*oldld*] } {
|
||||
return
|
||||
}
|
||||
|
||||
load_lib ld-lib.exp
|
||||
|
||||
set rd_test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
|
||||
|
@ -494,9 +494,8 @@ if { [at_least_gcc_version 4 7] } {
|
||||
# Since the asm symbol name hack in pr12365b.c doesn't work on all
|
||||
# targets, run PR ld/12365 tests only for known targets.
|
||||
if { ([istarget "i?86-*-elf*"]
|
||||
|| (([istarget "i?86-*-linux*"] || [istarget "i?86-*-gnu*"])
|
||||
&& ![istarget "*-*-*aout*"]
|
||||
&& ![istarget "*-*-*oldld*"])
|
||||
|| [istarget "i?86-*-linux*"]
|
||||
|| [istarget "i?86-*-gnu*"]
|
||||
|| [istarget "i?86-*-nacl*"]
|
||||
|| [istarget "x86_64-*-nacl*"]
|
||||
|| [istarget "x86_64-*-linux*"]
|
||||
|
@ -1,7 +1,7 @@
|
||||
#source: empty-address-2.s
|
||||
#ld: -Ttext 0x0000000 -Tdata 0x2000000 -T empty-address-2a.t
|
||||
#nm: -n
|
||||
#notarget: frv-*-*linux* *-*-linux*aout *-*-linux*oldld
|
||||
#notarget: frv-*-*linux*
|
||||
#...
|
||||
0+0 T _start
|
||||
#...
|
||||
|
@ -1,7 +1,7 @@
|
||||
#source: empty-address-2.s
|
||||
#ld: -Ttext 0x0000000 -Tdata 0x2000000 -T empty-address-2b.t
|
||||
#nm: -n
|
||||
#notarget: frv-*-*linux* *-*-linux*aout *-*-linux*oldld
|
||||
#notarget: frv-*-*linux*
|
||||
#...
|
||||
0+0 T _start
|
||||
#...
|
||||
|
@ -32,11 +32,6 @@ if { ![istarget *-*-sysv4*] \
|
||||
return
|
||||
}
|
||||
|
||||
if { [istarget *-*-linux*aout*] \
|
||||
|| [istarget *-*-linux*oldld*] } {
|
||||
return
|
||||
}
|
||||
|
||||
# This is a very simplistic test.
|
||||
|
||||
set testname "PHDRS2"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#source: section-match-1.s
|
||||
#ld: -T section-match-1.t
|
||||
#objdump: -s
|
||||
#notarget: *-*-osf* *-*-aix* *-*-pe *-*-*aout *-*-*oldld *-*-ecoff *-*-netbsd *-*-vms h8300-*-* tic30-*-*
|
||||
#notarget: *-*-osf* *-*-aix* *-*-pe *-*-*aout *-*-ecoff *-*-netbsd *-*-vms h8300-*-* tic30-*-*
|
||||
# This test uses arbitrary section names, which are not support by some
|
||||
# file formts. Also these section names must be present in the
|
||||
# output, not translated into some other name, eg .text
|
||||
|
@ -61,11 +61,6 @@ if { ![istarget hppa*64*-*-hpux*] \
|
||||
return
|
||||
}
|
||||
|
||||
if { [istarget *-*-linux*aout*] \
|
||||
|| [istarget *-*-linux*oldld*] } {
|
||||
return
|
||||
}
|
||||
|
||||
set tmpdir tmpdir
|
||||
set SHCFLAG ""
|
||||
set shared_needs_pic "no"
|
||||
|
@ -21,16 +21,14 @@
|
||||
#
|
||||
|
||||
|
||||
# Size relications have only been implemented for the ix86 and x86_64,
|
||||
# Size relocations have only been implemented for the ix86 and x86_64,
|
||||
# so far.
|
||||
if {!(([istarget "i?86-*-*"]
|
||||
|| [istarget "x86_64-*-*"])
|
||||
&& ([istarget "*-*-elf*"]
|
||||
|| [istarget "*-*-nacl*"]
|
||||
|| (([istarget "*-*-linux*"]
|
||||
|| [istarget "*-*-gnu*"])
|
||||
&& ![istarget "*-*-*aout*"]
|
||||
&& ![istarget "*-*-*oldld*"]))) } {
|
||||
|| [istarget "*-*-linux*"]
|
||||
|| [istarget "*-*-gnu*"])) } {
|
||||
verbose "Size relocations tests not run - no target support"
|
||||
return
|
||||
}
|
||||
|
@ -52,9 +52,7 @@ if {[istarget "sparc-*-vxworks"]} {
|
||||
|
||||
if { !([istarget "sparc*-*-elf*"]
|
||||
|| [istarget "sparc*-sun-solaris*"]
|
||||
|| ([istarget "sparc*-*-linux*"]
|
||||
&& ![istarget "*-*-*aout*"]
|
||||
&& ![istarget "*-*-*oldld*"])) } {
|
||||
|| [istarget "sparc*-*-linux*"]) } {
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user