From 5197d474361b4748e0339ae60e6dc9975f2313df Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 11 May 2015 12:01:57 -0700 Subject: Default e_machine to EM_IAMCU for i?86-*-elfiamcu This patch sets the default ELF output format of assembler and linker to EM_IAMCU when binutils is configured to i?86-*-elfiamcu target. gas/ * configure.tgt (arch): Set to iamcu for i386-*-elfiamcu target. * config/tc-i386.c (i386_mach): Support iamcu. (i386_target_format): Likewise. ld/ * configure.tgt: Support i[3-7]86-*-elfiamcu target. ld/testsuite/ * ld-i386/i386.exp (iamcu_tests): Run iamcu-4. * ld-i386/iamcu-4.d: New file. --- ld/ChangeLog | 4 ++++ ld/configure.tgt | 2 ++ ld/testsuite/ChangeLog | 5 +++++ ld/testsuite/ld-i386/i386.exp | 1 + ld/testsuite/ld-i386/iamcu-4.d | 16 ++++++++++++++++ 5 files changed, 28 insertions(+) create mode 100644 ld/testsuite/ld-i386/iamcu-4.d (limited to 'ld') diff --git a/ld/ChangeLog b/ld/ChangeLog index bbb819b..4cd77f7 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,9 @@ 2015-05-11 H.J. Lu + * configure.tgt: Support i[3-7]86-*-elfiamcu target. + +2015-05-11 H.J. Lu + * 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 diff --git a/ld/configure.tgt b/ld/configure.tgt index e1f5be7..e4eacd4 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -304,6 +304,8 @@ x86_64-*-netbsd*) targ_emul=elf_x86_64 sed -e 's/netbsd/netbsdelf/'`;; esac ;; i[3-7]86-*-netware) targ_emul=i386nw ;; +i[3-7]86-*-elfiamcu) targ_emul=elf_iamcu + targ_extra_emuls=elf_i386 ;; i[3-7]86-*-elf*) targ_emul=elf_i386 targ_extra_emuls=elf_iamcu ;; x86_64-*-elf*) targ_emul=elf_x86_64 diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 52f09fb..89f695c 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2015-05-11 H.J. Lu + * ld-i386/i386.exp (iamcu_tests): Run iamcu-4. + * ld-i386/iamcu-4.d: New file. + +2015-05-11 H.J. Lu + * ld-i386/abs-iamcu.d: New file. * ld-i386/dummy.s: Likewise. * ld-i386/foo.s: Likewise. diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index 7309910..2e59522 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -248,6 +248,7 @@ proc iamcu_tests {} { run_dump_test "iamcu-1" run_dump_test "iamcu-2" run_dump_test "iamcu-3" + run_dump_test "iamcu-4" } iamcu_tests diff --git a/ld/testsuite/ld-i386/iamcu-4.d b/ld/testsuite/ld-i386/iamcu-4.d new file mode 100644 index 0000000..b43d048 --- /dev/null +++ b/ld/testsuite/ld-i386/iamcu-4.d @@ -0,0 +1,16 @@ +#source: dummy.s +#ld: tmpdir/startiamcu.o tmpdir/fooiamcu.o +#readelf: -h +#target: i?86-*-elfiamcu + +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 -- cgit v1.1