diff options
author | Ian Lance Taylor <ian@airs.com> | 2009-06-24 05:01:17 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2009-06-24 05:01:17 +0000 |
commit | 459c9f1c5f4e19a4fdf39ccd9289f0fde532a21b (patch) | |
tree | cd3535671fa5e3a04044dd9da0a07b8c83c4f5e4 /gold/gold.cc | |
parent | dab97f2471e9939e4ddd126a5cab730c5f6831b5 (diff) | |
download | gdb-459c9f1c5f4e19a4fdf39ccd9289f0fde532a21b.zip gdb-459c9f1c5f4e19a4fdf39ccd9289f0fde532a21b.tar.gz gdb-459c9f1c5f4e19a4fdf39ccd9289f0fde532a21b.tar.bz2 |
PR 10237
* options.cc (General_options::parse_V): Set printed_version_.
(General_options::General_options): Initialize printed_version_.
* options.h (class General_options): Add printed_version_ field.
* gold.cc (queue_initial_tasks): If there are no input files,
don't give a fatal error if we printed the version information.
(queue_middle_tasks): If using -r with a shared object, give a
fatal error rather than an ordinary error.
Diffstat (limited to 'gold/gold.cc')
-rw-r--r-- | gold/gold.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gold/gold.cc b/gold/gold.cc index 93d0358..ae4b8b8 100644 --- a/gold/gold.cc +++ b/gold/gold.cc @@ -164,7 +164,11 @@ queue_initial_tasks(const General_options& options, Symbol_table* symtab, Layout* layout, Mapfile* mapfile) { if (cmdline.begin() == cmdline.end()) - gold_fatal(_("no input files")); + { + if (options.printed_version()) + gold_exit(true); + gold_fatal(_("no input files")); + } int thread_count = options.thread_count_initial(); if (thread_count == 0) @@ -364,7 +368,7 @@ queue_middle_tasks(const General_options& options, (*input_objects->dynobj_begin())->name().c_str()); } if (!doing_static_link && parameters->options().relocatable()) - gold_error(_("cannot mix -r with dynamic object %s"), + gold_fatal(_("cannot mix -r with dynamic object %s"), (*input_objects->dynobj_begin())->name().c_str()); if (!doing_static_link && options.oformat_enum() != General_options::OBJECT_FORMAT_ELF) |