Added an mtgos patch

This commit is contained in:
Morten Delenk 2016-08-26 20:10:22 +02:00
parent 1b8b65328f
commit e4791ff4b8
No known key found for this signature in database
GPG key ID: 3F818D0F65DCB490
9 changed files with 70 additions and 1 deletions

View file

@ -291,6 +291,11 @@ case "${targ}" in
targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec" targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec"
targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch" targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch"
;; ;;
arm-*-mtgos*)
targ_defvec=arm_elf32_vec
targ_selvecs=
targ64_sevecs=x86_64_elf32_vec
;;
arm-*-nacl*) arm-*-nacl*)
targ_defvec=arm_elf32_nacl_le_vec targ_defvec=arm_elf32_nacl_le_vec
targ_selvecs="arm_elf32_nacl_be_vec i386_elf32_nacl_vec" targ_selvecs="arm_elf32_nacl_be_vec i386_elf32_nacl_vec"
@ -551,7 +556,11 @@ case "${targ}" in
targ_defvec=i370_elf32_vec targ_defvec=i370_elf32_vec
targ_selvecs="i370_elf32_vec" targ_selvecs="i370_elf32_vec"
;; ;;
i[3-7]86-*-mtgos*)
targ_defvec=i386_elf32_vec
targ_selvecs=
targ64_selvecs=x86_64_elf64_vec
;;
i[3-7]86-*-sco3.2v5*coff) i[3-7]86-*-sco3.2v5*coff)
targ_defvec=i386_coff_vec targ_defvec=i386_coff_vec
targ_selvecs=i386_elf32_vec targ_selvecs=i386_elf32_vec
@ -683,6 +692,11 @@ case "${targ}" in
targ_archs="$targ_archs bfd_arm_arch" targ_archs="$targ_archs bfd_arm_arch"
;; ;;
#ifdef BFD64 #ifdef BFD64
x86_64-*-mtgos*)
targ_defvec=x86_64_elf64_vec
targ_selvecs=
want64=true
;;
x86_64-*-cloudabi*) x86_64-*-cloudabi*)
targ_defvec=x86_64_elf64_cloudabi_vec targ_defvec=x86_64_elf64_cloudabi_vec
want64=true want64=true

1
config.sub vendored
View file

@ -1411,6 +1411,7 @@ case $os in
;; ;;
esac esac
;; ;;
-mtgos*) ;;
-nto-qnx*) -nto-qnx*)
;; ;;
-nto*) -nto*)

View file

@ -132,6 +132,7 @@ case ${generic_target} in
arc-*-elf*) fmt=elf ;; arc-*-elf*) fmt=elf ;;
arc*-*-linux*) fmt=elf bfd_gas=yes ;; arc*-*-linux*) fmt=elf bfd_gas=yes ;;
arm-*-mtgos*) fmt=elf ;;
arm-*-aout) fmt=aout ;; arm-*-aout) fmt=aout ;;
arm-*-coff) fmt=coff ;; arm-*-coff) fmt=coff ;;
arm-*-phoenix*) fmt=elf ;; arm-*-phoenix*) fmt=elf ;;
@ -212,6 +213,7 @@ case ${generic_target} in
i370-*-elf* | i370-*-linux*) fmt=elf ;; i370-*-elf* | i370-*-linux*) fmt=elf ;;
i386-*-mtgos) fmt=elf ;;
i386-ibm-aix*) fmt=coff em=i386aix ;; i386-ibm-aix*) fmt=coff em=i386aix ;;
i386-sequent-bsd*) fmt=aout em=dynix ;; i386-sequent-bsd*) fmt=aout em=dynix ;;
i386-*-beospe*) fmt=coff em=pe ;; i386-*-beospe*) fmt=coff em=pe ;;

View file

@ -174,6 +174,7 @@ ALL_EMULATION_SOURCES = \
earmaoutl.c \ earmaoutl.c \
earmcoff.c \ earmcoff.c \
earmelf.c \ earmelf.c \
eelf_arm_mtgos.c \
earmelf_fbsd.c \ earmelf_fbsd.c \
earmelf_linux.c \ earmelf_linux.c \
earmelf_linux_eabi.c \ earmelf_linux_eabi.c \
@ -287,6 +288,7 @@ ALL_EMULATION_SOURCES = \
eelf32xstormy16.c \ eelf32xstormy16.c \
eelf32xtensa.c \ eelf32xtensa.c \
eelf_i386.c \ eelf_i386.c \
eelf_i386_mtgos.c \
eelf_i386_be.c \ eelf_i386_be.c \
eelf_i386_chaos.c \ eelf_i386_chaos.c \
eelf_i386_fbsd.c \ eelf_i386_fbsd.c \
@ -503,6 +505,7 @@ ALL_64_EMULATION_SOURCES = \
eelf_k1om.c \ eelf_k1om.c \
eelf_k1om_fbsd.c \ eelf_k1om_fbsd.c \
eelf_x86_64.c \ eelf_x86_64.c \
eelf_x86_64_mtgos.c \
eelf_x86_64_cloudabi.c \ eelf_x86_64_cloudabi.c \
eelf_x86_64_fbsd.c \ eelf_x86_64_fbsd.c \
eelf_x86_64_nacl.c \ eelf_x86_64_nacl.c \
@ -752,6 +755,10 @@ earmelf.c: $(srcdir)/emulparams/armelf.sh \
$(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eelf_arm_mtgos.c: $(srcdir)/emulparams/elf_arm_mtgos.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_arm_mtgos "$(tdir_elf_i386_myos)"
earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \ earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
$(srcdir)/emulparams/armelf.sh \ $(srcdir)/emulparams/armelf.sh \
$(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
@ -1312,6 +1319,10 @@ eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh $(ELF_DEPS) \
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \ eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
$(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eelf_i386_mtgos.c: $(srcdir)/emulparams/elf_i386_mtgos.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_mtgos "$(tdir_elf_i386_mtgos)"
eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \ eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@ -2005,6 +2016,10 @@ eelf_k1om_fbsd.c: $(srcdir)/emulparams/elf_k1om_fbsd.sh \
eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \ eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
$(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eelf_x86_64_myos.c: $(srcdir)/emulparams/elf_x86_64_mtgos.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_x86_64_mtgos "$(tdir_elf_x86_64_mtgos)"
eelf_x86_64_cloudabi.c: $(srcdir)/emulparams/elf_x86_64_cloudabi.sh \ eelf_x86_64_cloudabi.c: $(srcdir)/emulparams/elf_x86_64_cloudabi.sh \
$(srcdir)/emulparams/elf_x86_64.sh \ $(srcdir)/emulparams/elf_x86_64.sh \
$(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}

View file

@ -542,6 +542,7 @@ ALL_EMULATION_SOURCES = \
earmaoutl.c \ earmaoutl.c \
earmcoff.c \ earmcoff.c \
earmelf.c \ earmelf.c \
eelf_arm_mtgos.c \
earmelf_fbsd.c \ earmelf_fbsd.c \
earmelf_linux.c \ earmelf_linux.c \
earmelf_linux_eabi.c \ earmelf_linux_eabi.c \
@ -655,6 +656,7 @@ ALL_EMULATION_SOURCES = \
eelf32xstormy16.c \ eelf32xstormy16.c \
eelf32xtensa.c \ eelf32xtensa.c \
eelf_i386.c \ eelf_i386.c \
eelf_i386_mtgos.c \
eelf_i386_be.c \ eelf_i386_be.c \
eelf_i386_chaos.c \ eelf_i386_chaos.c \
eelf_i386_fbsd.c \ eelf_i386_fbsd.c \
@ -870,6 +872,7 @@ ALL_64_EMULATION_SOURCES = \
eelf_k1om.c \ eelf_k1om.c \
eelf_k1om_fbsd.c \ eelf_k1om_fbsd.c \
eelf_x86_64.c \ eelf_x86_64.c \
eelf_x86_64_mtgos.c \
eelf_x86_64_cloudabi.c \ eelf_x86_64_cloudabi.c \
eelf_x86_64_fbsd.c \ eelf_x86_64_fbsd.c \
eelf_x86_64_nacl.c \ eelf_x86_64_nacl.c \
@ -1338,11 +1341,13 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64rdos.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64rdos.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx_be.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx_be.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_arm_mtgos.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_chaos.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_chaos.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_fbsd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_fbsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_ldso.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_ldso.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_mtgos.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_nacl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_nacl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_sol2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_sol2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_vxworks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_vxworks.Po@am__quote@
@ -1355,6 +1360,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_cloudabi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_cloudabi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_fbsd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_fbsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_mtgos.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_nacl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_nacl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_sol2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_sol2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/egld960.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/egld960.Po@am__quote@
@ -2340,6 +2346,10 @@ earmelf.c: $(srcdir)/emulparams/armelf.sh \
$(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eelf_arm_mtgos.c: $(srcdir)/emulparams/elf_arm_mtgos.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_arm_mtgos "$(tdir_elf_i386_myos)"
earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \ earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
$(srcdir)/emulparams/armelf.sh \ $(srcdir)/emulparams/armelf.sh \
$(ELF_DEPS) $(srcdir)/emultempl/armelf.em \ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
@ -2900,6 +2910,10 @@ eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh $(ELF_DEPS) \
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \ eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
$(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eelf_i386_mtgos.c: $(srcdir)/emulparams/elf_i386_mtgos.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_mtgos "$(tdir_elf_i386_mtgos)"
eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \ eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@ -3593,6 +3607,10 @@ eelf_k1om_fbsd.c: $(srcdir)/emulparams/elf_k1om_fbsd.sh \
eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \ eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
$(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
eelf_x86_64_myos.c: $(srcdir)/emulparams/elf_x86_64_mtgos.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_x86_64_mtgos "$(tdir_elf_x86_64_mtgos)"
eelf_x86_64_cloudabi.c: $(srcdir)/emulparams/elf_x86_64_cloudabi.sh \ eelf_x86_64_cloudabi.c: $(srcdir)/emulparams/elf_x86_64_cloudabi.sh \
$(srcdir)/emulparams/elf_x86_64.sh \ $(srcdir)/emulparams/elf_x86_64.sh \
$(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} $(ELF_X86_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}

View file

@ -95,6 +95,9 @@ arm*b-*-freebsd*) targ_emul=armelfb_fbsd
arm*-*-freebsd* | arm-*-kfreebsd*-gnu) arm*-*-freebsd* | arm-*-kfreebsd*-gnu)
targ_emul=armelf_fbsd targ_emul=armelf_fbsd
targ_extra_emuls="armelfb_fbsd armelf" ;; targ_extra_emuls="armelfb_fbsd armelf" ;;
arm-*-mtgos*)
targ_emul=elf_arm_mtgos
targ_extra_emuls=armelf ;;
armeb-*-netbsdelf*) targ_emul=armelfb_nbsd; armeb-*-netbsdelf*) targ_emul=armelfb_nbsd;
targ_extra_emuls="armelf_nbsd armelf armnbsd" ;; targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
arm-*-netbsdelf*) targ_emul=armelf_nbsd; arm-*-netbsdelf*) targ_emul=armelf_nbsd;
@ -229,6 +232,15 @@ i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;;
i[3-7]86-*-vsta) targ_emul=vsta ;; i[3-7]86-*-vsta) targ_emul=vsta ;;
i[3-7]86-*-go32) targ_emul=i386go32 ;; i[3-7]86-*-go32) targ_emul=i386go32 ;;
i[3-7]86-*-msdosdjgpp*) targ_emul=i386go32 ;; i[3-7]86-*-msdosdjgpp*) targ_emul=i386go32 ;;
i[3-7]86-*-mtgos*)
targ_emul=elf_i386_mtgos
targ_extra_emuls=elf_i386
targ64_extra_emuls="elf_x86_64_mtgos elf_x86_64"
;;
x86_64-*-mtgos*)
targ_emul=elf_x86_64_mtgos
targ_extra_emuls="elf_i386_mtgos elf_x86_64 elf_i386"
;;
i[3-7]86-*-aix*) targ_emul=i386coff ;; i[3-7]86-*-aix*) targ_emul=i386coff ;;
i[3-7]86-*-sco*) targ_emul=i386coff ;; i[3-7]86-*-sco*) targ_emul=i386coff ;;
i[3-7]86-*-isc*) targ_emul=i386coff ;; i[3-7]86-*-isc*) targ_emul=i386coff ;;

View file

@ -0,0 +1,3 @@
. ${srcdir}/emulparams/armelf.sh
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes

View file

@ -0,0 +1,3 @@
. ${srcdir}/emulparams/elf_i386.sh
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes

View file

@ -0,0 +1 @@
. ${srcdir}/emulparams/elf_x86_64.sh