From 6c14750f48f179e0fed8abc34010de3e05ec2a54 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 11 May 2015 09:57:20 -0700 Subject: Add EM_386/EM_IAMCU support to elfedit.c binutils/ * elfedit.c (enum elfclass): New. (input_elf_class): Change type to enum elfclass. (output_elf_class): New. (elf_class): Change return type to enum elfclass. Support EM_386 and EM_IAMCU. (update_elf_header): Check if input and output ELF classes match. (elf_machine): Support EM_386 and EM_IAMCU. (main): Update input_elf_class. Set output_elf_class. * doc/binutils.texi: Update elfedit. binutils/testsuite/ * binutils-all/elfedit-5.d: New file. * binutils-all/elfedit.exp: Run elfedit-5. --- binutils/testsuite/binutils-all/elfedit-5.d | 17 +++++++++++++++++ binutils/testsuite/binutils-all/elfedit.exp | 1 + 2 files changed, 18 insertions(+) create mode 100644 binutils/testsuite/binutils-all/elfedit-5.d (limited to 'binutils/testsuite/binutils-all') diff --git a/binutils/testsuite/binutils-all/elfedit-5.d b/binutils/testsuite/binutils-all/elfedit-5.d new file mode 100644 index 0000000..44b3c71 --- /dev/null +++ b/binutils/testsuite/binutils-all/elfedit-5.d @@ -0,0 +1,17 @@ +#PROG: elfedit +#elfedit: --output-mach iamcu +#source: empty.s +#as: --32 +#readelf: -h +#name: Update ELF header 5 +#target: x86_64-*-* i386-*-* + +#... +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\) +#... + Machine: Intel MCU +#... diff --git a/binutils/testsuite/binutils-all/elfedit.exp b/binutils/testsuite/binutils-all/elfedit.exp index 465c39d..742dd15 100644 --- a/binutils/testsuite/binutils-all/elfedit.exp +++ b/binutils/testsuite/binutils-all/elfedit.exp @@ -32,3 +32,4 @@ run_dump_test "elfedit-1" run_dump_test "elfedit-2" run_dump_test "elfedit-3" run_dump_test "elfedit-4" +run_dump_test "elfedit-5" -- cgit v1.1