Add Intel MCU support to ld
-m elf_iamcu must be passed to i386 linker to generate Intel MCU binary. ld/ * Makefile.am (ALL_EMULATION_SOURCES): Add eelf_iamcu.c. (eelf_iamcu.c): New. * configure.tgt (targ_extra_emuls): Add elf_iamcu if elf_i386 is enabled in BFD. * Makefile.in: Regenerated. * emulparams/elf_iamcu.sh: New file. ld/testsuite/ * ld-i386/abs-iamcu.d: New file. * ld-i386/dummy.s: Likewise. * ld-i386/foo.s: Likewise. * ld-i386/iamcu-1.d: Likewise. * ld-i386/iamcu-2.d: Likewise. * ld-i386/iamcu-3.d: Likewise. * ld-i386/start.s: Likewise. * ld-i386/i386.exp (iamcu_tests): New. Run iamcu_tests.
This commit is contained in:
parent
814860358c
commit
7e0a81123d
@ -1,3 +1,12 @@
|
|||||||
|
2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* Makefile.am (ALL_EMULATION_SOURCES): Add eelf_iamcu.c.
|
||||||
|
(eelf_iamcu.c): New.
|
||||||
|
* configure.tgt (targ_extra_emuls): Add elf_iamcu if elf_i386 is
|
||||||
|
enabled in BFD.
|
||||||
|
* Makefile.in: Regenerated.
|
||||||
|
* emulparams/elf_iamcu.sh: New file.
|
||||||
|
|
||||||
2015-05-05 Nick Clifton <nickc@redhat.com>
|
2015-05-05 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* emulparams/msp430elf.sh (TEMPLATE_NAME): Change to msp430.
|
* emulparams/msp430elf.sh (TEMPLATE_NAME): Change to msp430.
|
||||||
|
@ -282,6 +282,7 @@ ALL_EMULATION_SOURCES = \
|
|||||||
eelf_i386_nacl.c \
|
eelf_i386_nacl.c \
|
||||||
eelf_i386_sol2.c \
|
eelf_i386_sol2.c \
|
||||||
eelf_i386_vxworks.c \
|
eelf_i386_vxworks.c \
|
||||||
|
eelf_iamcu.c \
|
||||||
eelf_s390.c \
|
eelf_s390.c \
|
||||||
egld960.c \
|
egld960.c \
|
||||||
egld960coff.c \
|
egld960coff.c \
|
||||||
@ -1296,6 +1297,9 @@ eelf_i386_vxworks.c: $(srcdir)/emulparams/elf_i386_vxworks.sh \
|
|||||||
$(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
|
$(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
|
||||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||||
|
|
||||||
|
eelf_iamcu.c: $(srcdir)/emulparams/elf_iamcu.sh \
|
||||||
|
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||||
|
|
||||||
eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
|
eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
|
||||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||||
|
|
||||||
|
@ -612,6 +612,7 @@ ALL_EMULATION_SOURCES = \
|
|||||||
eelf_i386_nacl.c \
|
eelf_i386_nacl.c \
|
||||||
eelf_i386_sol2.c \
|
eelf_i386_sol2.c \
|
||||||
eelf_i386_vxworks.c \
|
eelf_i386_vxworks.c \
|
||||||
|
eelf_iamcu.c \
|
||||||
eelf_s390.c \
|
eelf_s390.c \
|
||||||
egld960.c \
|
egld960.c \
|
||||||
egld960coff.c \
|
egld960coff.c \
|
||||||
@ -1275,6 +1276,7 @@ distclean-compile:
|
|||||||
@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@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_iamcu.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_k1om.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_k1om.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_k1om_fbsd.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_k1om_fbsd.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_l1om.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_l1om.Po@am__quote@
|
||||||
@ -1357,8 +1359,8 @@ distclean-compile:
|
|||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emn10200.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emn10200.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emn10300.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emn10300.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emoxiebox.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emoxiebox.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emsp430elf.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emsp430X.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emsp430X.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emsp430elf.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ends32belf.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ends32belf.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ends32belf16m.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ends32belf16m.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ends32belf_linux.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ends32belf_linux.Po@am__quote@
|
||||||
@ -2794,6 +2796,9 @@ eelf_i386_vxworks.c: $(srcdir)/emulparams/elf_i386_vxworks.sh \
|
|||||||
$(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
|
$(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
|
||||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||||
|
|
||||||
|
eelf_iamcu.c: $(srcdir)/emulparams/elf_iamcu.sh \
|
||||||
|
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||||
|
|
||||||
eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
|
eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
|
||||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||||
|
|
||||||
|
@ -226,9 +226,12 @@ i[3-7]86-*-sco*) targ_emul=i386coff ;;
|
|||||||
i[3-7]86-*-isc*) targ_emul=i386coff ;;
|
i[3-7]86-*-isc*) targ_emul=i386coff ;;
|
||||||
i[3-7]86-*-lynxos*) targ_emul=i386lynx ;;
|
i[3-7]86-*-lynxos*) targ_emul=i386lynx ;;
|
||||||
i[3-7]86-*-coff) targ_emul=i386coff ;;
|
i[3-7]86-*-coff) targ_emul=i386coff ;;
|
||||||
i[3-7]86-*-rtems*) targ_emul=elf_i386 ;;
|
i[3-7]86-*-rtems*) targ_emul=elf_i386
|
||||||
i[3-7]86-*-aros*) targ_emul=elf_i386 ;;
|
targ_extra_emuls=elf_iamcu ;;
|
||||||
i[3-7]86-*-rdos*) targ_emul=elf_i386 ;;
|
i[3-7]86-*-aros*) targ_emul=elf_i386
|
||||||
|
targ_extra_emuls=elf_iamcu ;;
|
||||||
|
i[3-7]86-*-rdos*) targ_emul=elf_i386
|
||||||
|
targ_extra_emuls=elf_iamcu ;;
|
||||||
x86_64-*-rdos*) targ_emul=elf64rdos ;;
|
x86_64-*-rdos*) targ_emul=elf64rdos ;;
|
||||||
x86_64-*-cloudabi*) targ_emul=elf_x86_64_cloudabi ;;
|
x86_64-*-cloudabi*) targ_emul=elf_x86_64_cloudabi ;;
|
||||||
i[3-7]86-*-bsd) targ_emul=i386bsd ;;
|
i[3-7]86-*-bsd) targ_emul=i386bsd ;;
|
||||||
@ -236,26 +239,30 @@ i[3-7]86-*-bsd386) targ_emul=i386bsd ;;
|
|||||||
i[3-7]86-*-bsdi*) targ_emul=i386bsd ;;
|
i[3-7]86-*-bsdi*) targ_emul=i386bsd ;;
|
||||||
i[3-7]86-*-aout) targ_emul=i386aout ;;
|
i[3-7]86-*-aout) targ_emul=i386aout ;;
|
||||||
i[3-7]86-*-linux*aout*) targ_emul=i386linux
|
i[3-7]86-*-linux*aout*) targ_emul=i386linux
|
||||||
targ_extra_emuls=elf_i386
|
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//'` ;;
|
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` ;;
|
||||||
i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
|
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
|
i[3-7]86-*-linux-*) targ_emul=elf_i386
|
||||||
targ_extra_emuls=i386linux
|
targ_extra_emuls="i386linux elf_iamcu"
|
||||||
targ64_extra_emuls="elf_x86_64 elf32_x86_64 elf_l1om elf_k1om"
|
targ64_extra_emuls="elf_x86_64 elf32_x86_64 elf_l1om elf_k1om"
|
||||||
targ64_extra_libpath=elf_x86_64
|
targ64_extra_libpath=elf_x86_64
|
||||||
targ_extra_libpath=elf32_x86_64
|
targ_extra_libpath=elf32_x86_64
|
||||||
tdir_i386linux=${targ_alias}aout ;;
|
tdir_i386linux=${targ_alias}aout ;;
|
||||||
x86_64-*-linux-gnux32) targ_emul=elf32_x86_64
|
x86_64-*-linux-gnux32) targ_emul=elf32_x86_64
|
||||||
targ_extra_emuls="elf_x86_64 elf_i386 i386linux elf_l1om elf_k1om"
|
targ_extra_emuls="elf_x86_64 elf_i386 elf_iamcu i386linux elf_l1om elf_k1om"
|
||||||
targ_extra_libpath="elf_i386 elf_x86_64 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_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/'` ;;
|
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
|
x86_64-*-linux-*) targ_emul=elf_x86_64
|
||||||
targ_extra_emuls="elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om"
|
targ_extra_emuls="elf32_x86_64 elf_i386 elf_iamcu i386linux elf_l1om elf_k1om"
|
||||||
targ_extra_libpath="elf_i386 elf32_x86_64 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_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
|
||||||
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
|
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
|
||||||
i[3-7]86-*-sysv[45]*) targ_emul=elf_i386 ;;
|
i[3-7]86-*-sysv[45]*) targ_emul=elf_i386
|
||||||
|
targ_extra_emuls=elf_iamcu ;;
|
||||||
i[3-7]86-*-solaris2*) targ_emul=elf_i386_sol2
|
i[3-7]86-*-solaris2*) targ_emul=elf_i386_sol2
|
||||||
targ_extra_emuls="elf_i386_ldso elf_i386 elf_x86_64_sol2 elf_x86_64 elf_l1om elf_k1om"
|
targ_extra_emuls="elf_i386_ldso elf_i386 elf_x86_64_sol2 elf_x86_64 elf_l1om elf_k1om"
|
||||||
targ_extra_libpath=$targ_extra_emuls
|
targ_extra_libpath=$targ_extra_emuls
|
||||||
@ -265,7 +272,8 @@ x86_64-*-solaris2*)
|
|||||||
targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_l1om elf_k1om"
|
targ_extra_emuls="elf_x86_64 elf_i386_sol2 elf_i386_ldso elf_i386 elf_l1om elf_k1om"
|
||||||
targ_extra_libpath=$targ_extra_emuls
|
targ_extra_libpath=$targ_extra_emuls
|
||||||
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
|
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
|
||||||
i[3-7]86-*-unixware) targ_emul=elf_i386 ;;
|
i[3-7]86-*-unixware) targ_emul=elf_i386
|
||||||
|
targ_extra_emuls=elf_iamcu ;;
|
||||||
i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso
|
i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso
|
||||||
targ_extra_emuls="elf_i386"
|
targ_extra_emuls="elf_i386"
|
||||||
targ_extra_libpath=$targ_extra_emuls
|
targ_extra_libpath=$targ_extra_emuls
|
||||||
@ -274,13 +282,20 @@ i[3-7]86-*-netbsdelf* | \
|
|||||||
i[3-7]86-*-netbsd*-gnu* | \
|
i[3-7]86-*-netbsd*-gnu* | \
|
||||||
i[3-7]86-*-knetbsd*-gnu)
|
i[3-7]86-*-knetbsd*-gnu)
|
||||||
targ_emul=elf_i386
|
targ_emul=elf_i386
|
||||||
targ_extra_emuls=i386nbsd ;;
|
targ_extra_emuls="elf_iamcu i386nbsd" ;;
|
||||||
i[3-7]86-*-netbsdpe*) targ_emul=i386pe
|
i[3-7]86-*-netbsdpe*) targ_emul=i386pe
|
||||||
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
|
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
|
||||||
i[3-7]86-*-netbsd*) targ_emul=i386nbsd
|
i[3-7]86-*-netbsd*) targ_emul=i386nbsd
|
||||||
targ_extra_emuls=elf_i386 ;;
|
targ_extra_emuls=elf_i386 ;;
|
||||||
x86_64-*-netbsd*) targ_emul=elf_x86_64
|
x86_64-*-netbsd*) targ_emul=elf_x86_64
|
||||||
targ_extra_emuls="elf_i386 i386nbsd elf_l1om elf_k1om"
|
targ_extra_emuls="elf_i386 elf_iamcu i386nbsd elf_l1om elf_k1om"
|
||||||
|
tdir_elf_iamcu=`echo ${targ_alias} | \
|
||||||
|
sed -e 's/x86_64/i386/'`
|
||||||
|
case "${tdir_elf_iamcu}" in
|
||||||
|
*-netbsdelf*) ;;
|
||||||
|
*) tdir_elf_iamcu=`echo ${tdir_elf_iamcu} | \
|
||||||
|
sed -e 's/netbsd/netbsdelf/'`;;
|
||||||
|
esac
|
||||||
tdir_elf_i386=`echo ${targ_alias} | \
|
tdir_elf_i386=`echo ${targ_alias} | \
|
||||||
sed -e 's/x86_64/i386/'`
|
sed -e 's/x86_64/i386/'`
|
||||||
case "${tdir_elf_i386}" in
|
case "${tdir_elf_i386}" in
|
||||||
@ -289,34 +304,38 @@ x86_64-*-netbsd*) targ_emul=elf_x86_64
|
|||||||
sed -e 's/netbsd/netbsdelf/'`;;
|
sed -e 's/netbsd/netbsdelf/'`;;
|
||||||
esac ;;
|
esac ;;
|
||||||
i[3-7]86-*-netware) targ_emul=i386nw ;;
|
i[3-7]86-*-netware) targ_emul=i386nw ;;
|
||||||
i[3-7]86-*-elf*) targ_emul=elf_i386 ;;
|
i[3-7]86-*-elf*) targ_emul=elf_i386
|
||||||
|
targ_extra_emuls=elf_iamcu ;;
|
||||||
x86_64-*-elf*) targ_emul=elf_x86_64
|
x86_64-*-elf*) targ_emul=elf_x86_64
|
||||||
targ_extra_emuls="elf_i386 elf32_x86_64 elf_l1om elf_k1om"
|
targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om"
|
||||||
targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om"
|
targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om"
|
||||||
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
|
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-*-kaos*) targ_emul=elf_i386 ;;
|
||||||
i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12])
|
i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12])
|
||||||
targ_emul=i386bsd ;;
|
targ_emul=i386bsd ;;
|
||||||
i[3-7]86-*-dragonfly*) targ_emul=elf_i386
|
i[3-7]86-*-dragonfly*) targ_emul=elf_i386
|
||||||
targ_extra_emuls="i386bsd" ;;
|
targ_extra_emuls="elf_iamcu i386bsd" ;;
|
||||||
x86_64-*-dragonfly*) targ_emul=elf_x86_64
|
x86_64-*-dragonfly*) targ_emul=elf_x86_64
|
||||||
targ_extra_emuls="elf_i386 elf_l1om elf_k1om" ;;
|
targ_extra_emuls="elf_i386 elf_iamcu elf_l1om elf_k1om" ;;
|
||||||
i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
|
i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
|
||||||
targ_emul=elf_i386_fbsd
|
targ_emul=elf_i386_fbsd
|
||||||
targ_extra_emuls="elf_i386 i386bsd" ;;
|
targ_extra_emuls="elf_i386 elf_iamcu i386bsd" ;;
|
||||||
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
|
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
|
||||||
targ_emul=elf_x86_64_fbsd
|
targ_emul=elf_x86_64_fbsd
|
||||||
targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386 elf_l1om elf_l1om_fbsd elf_k1om elf_k1om_fbsd"
|
targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386 elf_iamcu elf_l1om elf_l1om_fbsd elf_k1om elf_k1om_fbsd"
|
||||||
targ_extra_libpath="elf_i386_fbsd"
|
targ_extra_libpath="elf_i386_fbsd"
|
||||||
tdir_elf_i386_fbsd=`echo ${targ_alias} \
|
tdir_elf_i386_fbsd=`echo ${targ_alias} \
|
||||||
| sed -e 's/x86_64/i386/'`
|
| sed -e 's/x86_64/i386/'`
|
||||||
|
tdir_elf_iamcu=`echo ${targ_alias} \
|
||||||
|
| sed -e 's/x86_64/i386/'`
|
||||||
tdir_elf_i386=`echo ${targ_alias} \
|
tdir_elf_i386=`echo ${targ_alias} \
|
||||||
| sed -e 's/x86_64/i386/'` ;;
|
| sed -e 's/x86_64/i386/'` ;;
|
||||||
i[3-7]86-*-sysv*) targ_emul=i386coff ;;
|
i[3-7]86-*-sysv*) targ_emul=i386coff ;;
|
||||||
i[3-7]86-*-ptx*) targ_emul=i386coff ;;
|
i[3-7]86-*-ptx*) targ_emul=i386coff ;;
|
||||||
i[3-7]86-*-mach*) targ_emul=i386mach ;;
|
i[3-7]86-*-mach*) targ_emul=i386mach ;;
|
||||||
i[3-7]86-*-gnu*) targ_emul=elf_i386 ;;
|
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 ;;
|
i[3-7]86-*-msdos*) targ_emul=i386msdos; targ_extra_emuls=i386aout ;;
|
||||||
i[3-7]86-*-moss*) targ_emul=i386moss; targ_extra_emuls=i386msdos ;;
|
i[3-7]86-*-moss*) targ_emul=i386moss; targ_extra_emuls=i386msdos ;;
|
||||||
i[3-7]86-*-winnt*) targ_emul=i386pe ;
|
i[3-7]86-*-winnt*) targ_emul=i386pe ;
|
||||||
@ -544,7 +563,8 @@ or1k-*-rtems* | or1knd-*-rtems*) targ_emul=elf32or1k
|
|||||||
;;
|
;;
|
||||||
pdp11-*-*) targ_emul=pdp11
|
pdp11-*-*) targ_emul=pdp11
|
||||||
;;
|
;;
|
||||||
pjl*-*-*) targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;;
|
pjl*-*-*) targ_emul=pjlelf
|
||||||
|
targ_extra_emuls="elf_i386 elf_iamcu" ;;
|
||||||
pj*-*-*) targ_emul=pjelf
|
pj*-*-*) targ_emul=pjelf
|
||||||
;;
|
;;
|
||||||
powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
|
powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
|
||||||
|
33
ld/emulparams/elf_iamcu.sh
Normal file
33
ld/emulparams/elf_iamcu.sh
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
. ${srcdir}/emulparams/plt_unwind.sh
|
||||||
|
. ${srcdir}/emulparams/extern_protected_data.sh
|
||||||
|
SCRIPT_NAME=elf
|
||||||
|
OUTPUT_FORMAT="elf32-iamcu"
|
||||||
|
NO_RELA_RELOCS=yes
|
||||||
|
TEXT_START_ADDR=0x08048000
|
||||||
|
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
|
||||||
|
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
|
||||||
|
ARCH=iamcu
|
||||||
|
MACHINE=
|
||||||
|
TEMPLATE_NAME=elf32
|
||||||
|
GENERATE_SHLIB_SCRIPT=yes
|
||||||
|
GENERATE_PIE_SCRIPT=yes
|
||||||
|
NO_SMALL_DATA=yes
|
||||||
|
SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 12 ? 12 : 0"
|
||||||
|
IREL_IN_PLT=
|
||||||
|
# Reuse TINY_READONLY_SECTION which is placed right after .plt section.
|
||||||
|
TINY_READONLY_SECTION="
|
||||||
|
.plt.got ${RELOCATING-0} : { *(.plt.got) }
|
||||||
|
"
|
||||||
|
|
||||||
|
# Linux modify the default library search path to first include
|
||||||
|
# a 32-bit specific directory.
|
||||||
|
case "$target" in
|
||||||
|
x86_64*-linux* | i[3-7]86*-linux*)
|
||||||
|
case "$EMULATION_NAME" in
|
||||||
|
*i386*)
|
||||||
|
LIBPATH_SUFFIX=32
|
||||||
|
LIBPATH_SUFFIX_SKIP=64
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
@ -1,3 +1,15 @@
|
|||||||
|
2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* ld-i386/abs-iamcu.d: New file.
|
||||||
|
* ld-i386/dummy.s: Likewise.
|
||||||
|
* ld-i386/foo.s: Likewise.
|
||||||
|
* ld-i386/iamcu-1.d: Likewise.
|
||||||
|
* ld-i386/iamcu-2.d: Likewise.
|
||||||
|
* ld-i386/iamcu-3.d: Likewise.
|
||||||
|
* ld-i386/start.s: Likewise.
|
||||||
|
* ld-i386/i386.exp (iamcu_tests): New.
|
||||||
|
Run iamcu_tests.
|
||||||
|
|
||||||
2015-04-29 H.J. Lu <hongjiu.lu@intel.com>
|
2015-04-29 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR ld/18354
|
PR ld/18354
|
||||||
|
11
ld/testsuite/ld-i386/abs-iamcu.d
Normal file
11
ld/testsuite/ld-i386/abs-iamcu.d
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#name: Absolute non-overflowing relocs
|
||||||
|
#source: abs.s
|
||||||
|
#source: zero.s
|
||||||
|
#as: --32 -march=iamcu
|
||||||
|
#ld: -m elf_iamcu
|
||||||
|
#objdump: -rs -j .text
|
||||||
|
|
||||||
|
.*: file format .*
|
||||||
|
|
||||||
|
Contents of section \.text:
|
||||||
|
[ ][0-9a-f]+ c800fff0 c8000110 c9c3.*
|
1
ld/testsuite/ld-i386/dummy.s
Normal file
1
ld/testsuite/ld-i386/dummy.s
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Dummy
|
3
ld/testsuite/ld-i386/foo.s
Normal file
3
ld/testsuite/ld-i386/foo.s
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.globl foo
|
||||||
|
foo:
|
||||||
|
mov %eax, %ebx
|
@ -215,6 +215,43 @@ if [istarget "*-*-nacl*"] {
|
|||||||
regsub -all -- {([a-z0-9]+)\.pd} $i386tests {\1-nacl.pd} i386tests
|
regsub -all -- {([a-z0-9]+)\.pd} $i386tests {\1-nacl.pd} i386tests
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc iamcu_tests {} {
|
||||||
|
if {[istarget "*-*-nacl*"]} then {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
global as
|
||||||
|
global srcdir
|
||||||
|
global subdir
|
||||||
|
|
||||||
|
if ![ld_assemble $as "--32 -march=iamcu $srcdir/$subdir/start.s" tmpdir/startiamcu.o] {
|
||||||
|
unresolved "Build Intel MCU start.o"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if ![ld_assemble $as "--32 $srcdir/$subdir/start.s" tmpdir/start32.o] {
|
||||||
|
unresolved "Build ia32 start.o"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if ![ld_assemble $as "--32 -march=iamcu $srcdir/$subdir/foo.s" tmpdir/fooiamcu.o] {
|
||||||
|
unresolved "Build Intel MCU foo.o"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if ![ld_assemble $as "--32 $srcdir/$subdir/foo.s" tmpdir/foo32.o] {
|
||||||
|
unresolved "Build ia32 foo.o"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
run_dump_test "abs-iamcu"
|
||||||
|
run_dump_test "iamcu-1"
|
||||||
|
run_dump_test "iamcu-2"
|
||||||
|
run_dump_test "iamcu-3"
|
||||||
|
}
|
||||||
|
|
||||||
|
iamcu_tests
|
||||||
|
|
||||||
run_ld_link_tests $i386tests
|
run_ld_link_tests $i386tests
|
||||||
|
|
||||||
run_dump_test "abs"
|
run_dump_test "abs"
|
||||||
|
16
ld/testsuite/ld-i386/iamcu-1.d
Normal file
16
ld/testsuite/ld-i386/iamcu-1.d
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#source: dummy.s
|
||||||
|
#as: --32 -march=iamcu
|
||||||
|
#ld: -m elf_iamcu tmpdir/startiamcu.o tmpdir/fooiamcu.o
|
||||||
|
#readelf: -h
|
||||||
|
|
||||||
|
ELF Header:
|
||||||
|
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
|
||||||
|
Class: ELF32
|
||||||
|
Data: 2's complement, little endian
|
||||||
|
Version: 1 \(current\)
|
||||||
|
OS/ABI: UNIX - System V
|
||||||
|
ABI Version: 0
|
||||||
|
Type: EXEC \(Executable file\)
|
||||||
|
Machine: Intel MCU
|
||||||
|
Version: 0x1
|
||||||
|
#pass
|
4
ld/testsuite/ld-i386/iamcu-2.d
Normal file
4
ld/testsuite/ld-i386/iamcu-2.d
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#source: dummy.s
|
||||||
|
#as: --32 -march=iamcu
|
||||||
|
#ld: -m elf_iamcu tmpdir/startiamcu.o tmpdir/foo32.o
|
||||||
|
#error: .*i386(:.+)? architecture of input file `tmpdir/foo32.o' is incompatible with iamcu.* output
|
4
ld/testsuite/ld-i386/iamcu-3.d
Normal file
4
ld/testsuite/ld-i386/iamcu-3.d
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#source: dummy.s
|
||||||
|
#as: --32
|
||||||
|
#ld: -m elf_i386 tmpdir/startiamcu.o tmpdir/foo32.o
|
||||||
|
#error: iamcu.* architecture of input file `tmpdir/startiamcu.o' is incompatible with .*i386(:.+)? output
|
3
ld/testsuite/ld-i386/start.s
Normal file
3
ld/testsuite/ld-i386/start.s
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.globl _start
|
||||||
|
_start:
|
||||||
|
jmp foo
|
Loading…
x
Reference in New Issue
Block a user