Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: binutils/gold/object.cc

Issue 3018030: [binutils] Bump binutils to 2.20.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « binutils/gold/object.h ('k') | binutils/gold/options.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // object.cc -- support for an object file for linking in gold 1 // object.cc -- support for an object file for linking in gold
2 2
3 // Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 3 // Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
4 // Written by Ian Lance Taylor <iant@google.com>. 4 // Written by Ian Lance Taylor <iant@google.com>.
5 5
6 // This file is part of gold. 6 // This file is part of gold.
7 7
8 // This program is free software; you can redistribute it and/or modify 8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by 9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 3 of the License, or 10 // the Free Software Foundation; either version 3 of the License, or
11 // (at your option) any later version. 11 // (at your option) any later version.
12 12
13 // This program is distributed in the hope that it will be useful, 13 // This program is distributed in the hope that it will be useful,
(...skipping 2113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 2127
2128 return true; 2128 return true;
2129 } 2129 }
2130 2130
2131 // For each dynamic object, record whether we've seen all of its 2131 // For each dynamic object, record whether we've seen all of its
2132 // explicit dependencies. 2132 // explicit dependencies.
2133 2133
2134 void 2134 void
2135 Input_objects::check_dynamic_dependencies() const 2135 Input_objects::check_dynamic_dependencies() const
2136 { 2136 {
2137 bool issued_copy_dt_needed_error = false;
2137 for (Dynobj_list::const_iterator p = this->dynobj_list_.begin(); 2138 for (Dynobj_list::const_iterator p = this->dynobj_list_.begin();
2138 p != this->dynobj_list_.end(); 2139 p != this->dynobj_list_.end();
2139 ++p) 2140 ++p)
2140 { 2141 {
2141 const Dynobj::Needed& needed((*p)->needed()); 2142 const Dynobj::Needed& needed((*p)->needed());
2142 bool found_all = true; 2143 bool found_all = true;
2143 for (Dynobj::Needed::const_iterator pneeded = needed.begin(); 2144 Dynobj::Needed::const_iterator pneeded;
2144 » pneeded != needed.end(); 2145 for (pneeded = needed.begin(); pneeded != needed.end(); ++pneeded)
2145 » ++pneeded)
2146 { 2146 {
2147 if (this->sonames_.find(*pneeded) == this->sonames_.end()) 2147 if (this->sonames_.find(*pneeded) == this->sonames_.end())
2148 { 2148 {
2149 found_all = false; 2149 found_all = false;
2150 break; 2150 break;
2151 } 2151 }
2152 } 2152 }
2153 (*p)->set_has_unknown_needed_entries(!found_all); 2153 (*p)->set_has_unknown_needed_entries(!found_all);
2154
2155 // --copy-dt-needed-entries aka --add-needed is a GNU ld option
2156 // --that gold does not support. However, they cause no trouble
2157 // --unless there is a DT_NEEDED entry that we don't know about;
2158 // --warn only in that case.
2159 if (!found_all
2160 && !issued_copy_dt_needed_error
2161 && (parameters->options().copy_dt_needed_entries()
2162 || parameters->options().add_needed()))
2163 {
2164 const char* optname;
2165 if (parameters->options().copy_dt_needed_entries())
2166 optname = "--copy-dt-needed-entries";
2167 else
2168 optname = "--add-needed";
2169 gold_error(_("%s is not supported but is required for %s in %s"),
2170 optname, (*pneeded).c_str(), (*p)->name().c_str());
2171 issued_copy_dt_needed_error = true;
2172 }
2154 } 2173 }
2155 } 2174 }
2156 2175
2157 // Start processing an archive. 2176 // Start processing an archive.
2158 2177
2159 void 2178 void
2160 Input_objects::archive_start(Archive* archive) 2179 Input_objects::archive_start(Archive* archive)
2161 { 2180 {
2162 if (parameters->options().user_set_print_symbol_counts()) 2181 if (parameters->options().user_set_print_symbol_counts())
2163 { 2182 {
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
2451 template 2470 template
2452 struct Relocate_info<64, false>; 2471 struct Relocate_info<64, false>;
2453 #endif 2472 #endif
2454 2473
2455 #ifdef HAVE_TARGET_64_BIG 2474 #ifdef HAVE_TARGET_64_BIG
2456 template 2475 template
2457 struct Relocate_info<64, true>; 2476 struct Relocate_info<64, true>;
2458 #endif 2477 #endif
2459 2478
2460 } // End namespace gold. 2479 } // End namespace gold.
OLDNEW
« no previous file with comments | « binutils/gold/object.h ('k') | binutils/gold/options.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698