aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-11-16 14:14:56 -0800
committerH.J. Lu <hjl.tools@gmail.com>2021-11-17 05:15:48 -0800
commitc9dcc18f8ded97ed7cd1dd64da8c7b37b86f61bb (patch)
tree27dc86ebf37b6e7510cc507a28f0cf28dffbf8f0 /binutils/testsuite
parent65e4a99a26452d99d586f6e5a0c43e24348a5125 (diff)
downloadgdb-c9dcc18f8ded97ed7cd1dd64da8c7b37b86f61bb.zip
gdb-c9dcc18f8ded97ed7cd1dd64da8c7b37b86f61bb.tar.gz
gdb-c9dcc18f8ded97ed7cd1dd64da8c7b37b86f61bb.tar.bz2
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.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r--binutils/testsuite/binutils-all/elfedit-6.d15
-rw-r--r--binutils/testsuite/binutils-all/elfedit.exp1
2 files changed, 16 insertions, 0 deletions
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"