aboutsummaryrefslogtreecommitdiff
path: root/gold/options.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-03-06 00:53:37 +0000
committerIan Lance Taylor <iant@google.com>2008-03-06 00:53:37 +0000
commit09ffbbe0d44895d6e6681430cf7a893840a9281b (patch)
treefe1f57e39faf985b527ad62aa5612c6e6651a73a /gold/options.h
parent7dfac99ff1ebec56f81c60747e2ac9b0f86fa588 (diff)
downloadfsf-binutils-gdb-09ffbbe0d44895d6e6681430cf7a893840a9281b.zip
fsf-binutils-gdb-09ffbbe0d44895d6e6681430cf7a893840a9281b.tar.gz
fsf-binutils-gdb-09ffbbe0d44895d6e6681430cf7a893840a9281b.tar.bz2
From Craig Silverstein: accept any string for input format, warn if
thread options when not supported.
Diffstat (limited to 'gold/options.h')
-rw-r--r--gold/options.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/gold/options.h b/gold/options.h
index 7f5a561..454991f 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -415,11 +415,12 @@ class General_options
DEFINE_bool(Bsymbolic, options::ONE_DASH, '\0', false,
_("Bind defined symbols locally"), NULL);
- DEFINE_enum(format, options::TWO_DASHES, 'b', "elf",
- _("Set input format"), _("[elf,binary]"),
- {"elf", "binary",
- "elf32-i386", "elf32-little", "elf32-big",
- "elf64-x86_64", "elf64-little", "elf64-big"});
+ // This should really be an "enum", but it's too easy for folks to
+ // forget to update the list as they add new targets. So we just
+ // accept any string. We'll fail later (when the string is parsed),
+ // if the target isn't actually supported.
+ DEFINE_string(format, options::TWO_DASHES, 'b', "elf",
+ _("Set input format"), _("[elf,binary]"));
#ifdef HAVE_ZLIB_H
DEFINE_enum(compress_debug_sections, options::TWO_DASHES, '\0', "none",