aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-10-09 00:11:28 +1030
committerAlan Modra <amodra@gmail.com>2019-10-09 00:37:36 +1030
commit0bc183f81a0ba549972371e78536dbd29d1c4e5f (patch)
tree7a243fea57c0c2db11c74aa54fdeff1109e88b7f
parentPowerPC TLS miscounting PLT for __tls_get_addr (diff)
downloadbinutils-gdb-0bc183f81a0ba549972371e78536dbd29d1c4e5f.tar.gz
binutils-gdb-0bc183f81a0ba549972371e78536dbd29d1c4e5f.tar.bz2
binutils-gdb-0bc183f81a0ba549972371e78536dbd29d1c4e5f.zip
PR25079, "ar s" stopped working
's' is both a command and a modifier. If given as a command then we aren't lacking an operation. I think the same goes when mri mode is selected: any following command line used to be ignored. PR 25079 * ar.c (decode_options): Don't try for command options if write_armap or mri_mode is selected. (cherry picked from commit b7d9d3ee59236d6039d7d7ccd17ff6b47e07a8aa)
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/ar.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 5de97327df..aa2516d487 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,6 +1,11 @@
2019-10-09 Alan Modra <amodra@gmail.com>
Apply from master
+ 2019-10-09 Alan Modra <amodra@gmail.com>
+ PR 25079
+ * ar.c (decode_options): Don't try for command options if
+ write_armap or mri_mode is selected.
+
2019-09-30 Alan Modra <amodra@gmail.com>
PR 25046
* readelf.c (process_program_headers): Clear dynamic_addr and
diff --git a/binutils/ar.c b/binutils/ar.c
index 4e953c054d..44a4d8f3a2 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -602,7 +602,8 @@ decode_options (int argc, char **argv)
/* PR 13256: Allow for the possibility that the first command line option
started with a dash (eg --plugin) but then the following option(s) are
old style, non-dash-prefixed versions. */
- if (operation == none && optind > 0 && optind < argc)
+ if (operation == none && write_armap != 1 && !mri_mode
+ && optind > 0 && optind < argc)
{
argv += (optind - 1);
argc -= (optind - 1);