diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-05-02 20:44:56 +0200 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-05-02 20:44:56 +0200 |
commit | a38b00b1744876c7d2d43f26ae510df02974494a (patch) | |
tree | 3cc43cd5b3aa570f23ea846aada0757869c47503 | |
parent | 9843e01a9bc698b5803808438eb85bb5c46722c2 (diff) | |
parent | c80811581709b9346364e3229b888f9ad830cdf5 (diff) | |
download | toolchain_binutils-a38b00b1744876c7d2d43f26ae510df02974494a.zip toolchain_binutils-a38b00b1744876c7d2d43f26ae510df02974494a.tar.gz toolchain_binutils-a38b00b1744876c7d2d43f26ae510df02974494a.tar.bz2 |
Merge branch 'master' of https://android.googlesource.com/toolchain/binutilsHEADreplicant-6.0-0001master
-rw-r--r-- | binutils-2.25/gold/gold.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/binutils-2.25/gold/gold.cc b/binutils-2.25/gold/gold.cc index b278b3c..d8a3f0c 100644 --- a/binutils-2.25/gold/gold.cc +++ b/binutils-2.25/gold/gold.cc @@ -495,6 +495,14 @@ queue_middle_tasks(const General_options& options, if (timer != NULL) timer->stamp(0); + // We have to support the case of not seeing any input objects, and + // generate an empty file. Existing builds depend on being able to + // pass an empty archive to the linker and get an empty object file + // out. In order to do this we need to use a default target. + if (input_objects->number_of_input_objects() == 0 + && layout->incremental_base() == NULL) + parameters_force_valid_target(); + // Add any symbols named with -u options to the symbol table. symtab->add_undefined_symbols_from_command_line(layout); @@ -555,14 +563,6 @@ queue_middle_tasks(const General_options& options, plugins->layout_deferred_objects(); } - // We have to support the case of not seeing any input objects, and - // generate an empty file. Existing builds depend on being able to - // pass an empty archive to the linker and get an empty object file - // out. In order to do this we need to use a default target. - if (input_objects->number_of_input_objects() == 0 - && layout->incremental_base() == NULL) - parameters_force_valid_target(); - // TODO(tmsriram): figure out a more principled way to get the target Target* target = const_cast<Target*>(¶meters->target()); |