diff options
author | Ant Bikeneev <ant.bikineev@gmail.com> | 2018-05-30 17:06:26 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2018-05-30 17:08:03 +0100 |
commit | 1869e86f2eb13a9e1d1c42b97cdb98fef88afd83 (patch) | |
tree | 18f71cb0a58e06370f41152a3393130306b163fd /binutils/testsuite | |
parent | fdbe37e35fed48091296434652101a63fa4360cf (diff) | |
download | gdb-1869e86f2eb13a9e1d1c42b97cdb98fef88afd83.zip gdb-1869e86f2eb13a9e1d1c42b97cdb98fef88afd83.tar.gz gdb-1869e86f2eb13a9e1d1c42b97cdb98fef88afd83.tar.bz2 |
Add option to ar's 't' command to display the offset of elements within the archive.
PR 23107
* ar.c (display_offsets): New variable.
(usage): Add description of 'O' operator.
(decode_option): Handle 'O' operator.
(print_descr): Pass display_offsets to print_arelt_descr.
* arsup.c: Update call to printy_arelt_descr.
* objdump.c: Likewise.
* bucomm.c (print_arelt_descr): If offsets parameter is true then
display offset of archive element within the archive.
* bucomm.h: Update prototype for print_arelt_descr.
* doc/binutils.texi: Update description of ar command.
* NEWS: Mention the new feature.
* testsuite/binutils-all/ar.exp: Add text of new feature.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r-- | binutils/testsuite/binutils-all/ar.exp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutils-all/ar.exp index f7c37b4..7abde85 100644 --- a/binutils/testsuite/binutils-all/ar.exp +++ b/binutils/testsuite/binutils-all/ar.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. @@ -113,7 +113,7 @@ proc long_filenames { bfdtests } { fail $testname return } - + if [is_remote host] { remote_file host delete $file1 remote_file host delete $file2 @@ -435,6 +435,12 @@ proc deterministic_archive { } { return } + set got [binutils_run $AR "tvO $archive"] + if ![string match "rw-r--r-- 0/0 *bintest.o 0x*" $got] { + fail $testname + return + } + pass $testname } @@ -571,7 +577,7 @@ proc empty_archive { } { # FIXME: There ought to be a way to dynamically create an empty file. set empty $srcdir/$subdir/empty - + if [is_remote host] { set archive artest.a set objfile [remote_download host $empty] |