From c9dcc18f8ded97ed7cd1dd64da8c7b37b86f61bb Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 16 Nov 2021 14:14:56 -0800 Subject: elfedit: Add --output-abiversion option to update ABIVERSION * NEWS: Mention --output-abiversion. * elfedit.c (input_elf_abiversion): New. (output_elf_abiversion): Likewise. (update_elf_header): Update EI_ABIVERSION. (command_line_switch): Add OPTION_INPUT_ABIVERSION and OPTION_OUTPUT_ABIVERSION. (options): Add --input-abiversion and --output-abiversion. (usage): Likewise. (main): Handle --input-abiversion and --output-abiversion. * doc/binutils.texi: Document --input-abiversion and --output-abiversion. * testsuite/binutils-all/elfedit.exp: Run elfedit-6. * testsuite/binutils-all/elfedit-6.d: New file. --- binutils/testsuite/binutils-all/elfedit-6.d | 15 +++++++++++++++ binutils/testsuite/binutils-all/elfedit.exp | 1 + 2 files changed, 16 insertions(+) create mode 100644 binutils/testsuite/binutils-all/elfedit-6.d (limited to 'binutils/testsuite') diff --git a/binutils/testsuite/binutils-all/elfedit-6.d b/binutils/testsuite/binutils-all/elfedit-6.d new file mode 100644 index 0000000..d30c6dc --- /dev/null +++ b/binutils/testsuite/binutils-all/elfedit-6.d @@ -0,0 +1,15 @@ +#PROG: elfedit +#elfedit: --output-abiversion 20 +#source: empty.s +#readelf: -h +#name: Update ELF header 6 +#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi + +#... +ELF Header: + Magic: 7f 45 4c 46 .* +#... + Version:[ \t]+1 \(current\) +#... + ABI Version:[ \t]+20 +#... diff --git a/binutils/testsuite/binutils-all/elfedit.exp b/binutils/testsuite/binutils-all/elfedit.exp index 8ce8c8b..6531984 100644 --- a/binutils/testsuite/binutils-all/elfedit.exp +++ b/binutils/testsuite/binutils-all/elfedit.exp @@ -25,3 +25,4 @@ run_dump_test "elfedit-2" run_dump_test "elfedit-3" run_dump_test "elfedit-4" run_dump_test "elfedit-5" +run_dump_test "elfedit-6" -- cgit v1.1