This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed 1/3] MIPS/LD/testsuite: mips-elf-flags: Use `-h' only with `readelf'
- From: "Maciej W. Rozycki" <macro at imgtec dot com>
- To: <binutils at sourceware dot org>
- Date: Tue, 27 Jun 2017 03:02:02 +0100
- Subject: [committed 1/3] MIPS/LD/testsuite: mips-elf-flags: Use `-h' only with `readelf'
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.00.1706261936150.31404@tp.orcam.me.uk>
For the purpose of link-time object compatibility handling verification
code in the `good_combination' procedure from the `mips-elf-flags.exp'
test script only examines the `e_flags' member of the ELF file header
and ignores data from any ELF program or section headers present. Use
`readelf -h' rather than `readelf --headers' then to obtain data for
examination, avoiding unnecessary processing to extract this extraneous
information.
ld/
* testsuite/ld-mips-elf/mips-elf-flags.exp (good_combination):
Use `readelf -h' rather than `readelf --headers'.
---
binutils-mips-ld-test-mips-elf-flags-readelf.diff
Index: binutils/ld/testsuite/ld-mips-elf/mips-elf-flags.exp
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/mips-elf-flags.exp 2017-06-23 17:11:30.911878789 +0100
+++ binutils/ld/testsuite/ld-mips-elf/mips-elf-flags.exp 2017-06-24 00:58:43.140525973 +0100
@@ -56,7 +56,7 @@ proc assemble_for_flags {arglist} {
}
# Assemble a file using each set of arguments in ARGLIST. Check that
-# the objects can be linked together and that the readelf output
+# the objects can be linked together and that the `readelf -h' output
# includes each flag named in FLAGS.
proc good_combination {arglist flags} {
global ld ldemul READELF
@@ -70,7 +70,7 @@ proc good_combination {arglist flags} {
} elseif {![ld_link "$ld $ldemul" $finalobj "-r $objs"]} {
fail $testname
} else {
- catch "exec $READELF --headers $finalobj" output
+ catch "exec $READELF -h $finalobj" output
if {![regexp "Flags: *(\[^\n\]*)" $output full gotflags]} {
unresolved $testname
} else {