// options.c -- handle command line options for gold
-// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
printf(" %s", *p);
printf("\n");
+ printf(_("%s: supported emulations:"), gold::program_name);
+ supported_names.clear();
+ gold::supported_emulation_names(&supported_names);
+ for (std::vector<const char*>::const_iterator p = supported_names.begin();
+ p != supported_names.end();
+ ++p)
+ printf(" %s", *p);
+ printf("\n");
+
// REPORT_BUGS_TO is defined in bfd/bfdver.h.
const char* report = REPORT_BUGS_TO;
if (*report != '\0')
}
void
+parse_percent(const char* option_name, const char* arg, double* retval)
+{
+ char* endptr;
+ *retval = strtod(arg, &endptr) / 100.0;
+ if (*endptr != '\0')
+ gold_fatal(_("%s: invalid option value "
+ "(expected a floating point number): %s"),
+ option_name, arg);
+}
+
+void
parse_string(const char* option_name, const char* arg, const char** retval)
{
if (*arg == '\0')
{
gold::print_version(true);
this->printed_version_ = true;
+
printf(_(" Supported targets:\n"));
std::vector<const char*> supported_names;
gold::supported_target_names(&supported_names);
p != supported_names.end();
++p)
printf(" %s\n", *p);
+
+ printf(_(" Supported emulations:\n"));
+ supported_names.clear();
+ gold::supported_emulation_names(&supported_names);
+ for (std::vector<const char*>::const_iterator p = supported_names.begin();
+ p != supported_names.end();
+ ++p)
+ printf(" %s\n", *p);
}
void
}
void
+General_options::parse_incremental_startup_unchanged(const char*, const char*,
+ Command_line*)
+{
+ this->implicit_incremental_ = true;
+ this->incremental_startup_disposition_ = INCREMENTAL_UNCHANGED;
+}
+
+void
General_options::parse_library(const char*, const char* arg,
Command_line* cmdline)
{
plugins_(NULL),
dynamic_list_(),
incremental_mode_(INCREMENTAL_OFF),
- incremental_disposition_(INCREMENTAL_CHECK),
+ incremental_disposition_(INCREMENTAL_STARTUP),
+ incremental_startup_disposition_(INCREMENTAL_CHECK),
implicit_incremental_(false),
excluded_libs_(),
symbols_to_retain_(),
if (this->pie() && this->relocatable())
gold_fatal(_("-pie and -r are incompatible"));
+ if (!this->shared())
+ {
+ if (this->filter() != NULL)
+ gold_fatal(_("-F/--filter may not used without -shared"));
+ if (this->any_auxiliary())
+ gold_fatal(_("-f/--auxiliary may not be used without -shared"));
+ }
+
// TODO: implement support for -retain-symbols-file with -r, if needed.
if (this->relocatable() && this->retain_symbols_file())
gold_fatal(_("-retain-symbols-file does not yet work with -r"));