From f1ddb6008e405707f7025369cfd7ec0ba442d128 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 15 Jul 2011 21:43:08 +0000 Subject: * options.h (class General_options): Add --print-output-format. Move -EL next to -EB, for better --help output. * target-select.cc: Include , "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. --- gold/freebsd.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gold/freebsd.h') diff --git a/gold/freebsd.h b/gold/freebsd.h index 8f0d46d..175dd05 100644 --- a/gold/freebsd.h +++ b/gold/freebsd.h @@ -80,6 +80,17 @@ class Target_selector_freebsd : public Target_selector names->push_back(this->freebsd_bfd_name_); } + // Return appropriate BFD name. + virtual const char* + do_target_bfd_name(const Target* target) + { + if (!this->is_our_target(target)) + return NULL; + return (target->osabi() == elfcpp::ELFOSABI_FREEBSD + ? this->freebsd_bfd_name_ + : this->bfd_name_); + } + private: // The BFD name for the non-Freebsd target. const char* bfd_name_; -- cgit v1.1