aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index b9fecef..4609858 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -3728,12 +3728,16 @@ main (int argc, char **argv)
machine = optarg;
break;
case 'M':
- if (disassembler_options)
- /* Ignore potential memory leak for now. */
- disassembler_options = concat (disassembler_options, ",",
- optarg, (const char *) NULL);
- else
- disassembler_options = optarg;
+ {
+ char *options;
+ if (disassembler_options)
+ /* Ignore potential memory leak for now. */
+ options = concat (disassembler_options, ",",
+ optarg, (const char *) NULL);
+ else
+ options = optarg;
+ disassembler_options = remove_whitespace_and_extra_commas (options);
+ }
break;
case 'j':
add_only (optarg);