diff options
author | Ian Lance Taylor <ian@airs.com> | 2011-07-15 21:43:08 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2011-07-15 21:43:08 +0000 |
commit | ac3e9957d99ec0196ddb610d69376e9a769ac0e2 (patch) | |
tree | cf0431eb972be11c7abefe73212164fc300e7c38 /gold/parameters.cc | |
parent | 20f8897f8d27c72546ddcd6d7c5cb88b276236af (diff) | |
download | binutils-redhat-ac3e9957d99ec0196ddb610d69376e9a769ac0e2.tar.gz |
* options.h (class General_options): Add --print-output-format.
Move -EL next to -EB, for better --help output.
* target-select.cc: Include <cstdio>, "options.h", and
"parameters.h".
(Target_selector::do_target_bfd_name): New function.
(print_output_format): New function.
* target-select.h (class Target_selector): Update declarations.
(Target_selector::target_bfd_name): New function.
(print_output_format): Declare.
* main.cc: Include "target-select.h".
(main): Handle --print-output-format.
* gold.cc: Include "target-select.h".
(queue_initial_tasks): Handle --print-output-format when there are
no input files.
* parameters.cc (parameters_force_valid_target): Give a better
error message if -EB/-EL does not match target.
* freebsd.h (Target_selector_freebsd::do_target_bfd_name): New
function.
Diffstat (limited to 'gold/parameters.cc')
-rw-r--r-- | gold/parameters.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gold/parameters.cc b/gold/parameters.cc index 0384dd6808..c14bd1e826 100644 --- a/gold/parameters.cc +++ b/gold/parameters.cc @@ -346,7 +346,13 @@ parameters_force_valid_target() is_big_endian, elfcpp::GOLD_DEFAULT_OSABI, 0); - gold_assert(target != NULL); + + if (target == NULL) + { + gold_assert(is_big_endian != GOLD_DEFAULT_BIG_ENDIAN); + gold_fatal(_("no supported target for -EB/-EL option")); + } + set_parameters_target(target); } |