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

Unified 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, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « binutils/gold/object.h ('k') | binutils/gold/options.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: binutils/gold/object.cc
diff --git a/binutils/gold/object.cc b/binutils/gold/object.cc
index e9826b08a206a60ea335435bf3724b1e06f88e7a..a824c769f18d32ca83a00cff2445a99d8b8a249a 100644
--- a/binutils/gold/object.cc
+++ b/binutils/gold/object.cc
@@ -1,6 +1,6 @@
// object.cc -- support for an object file for linking in gold
-// Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -2134,15 +2134,15 @@ Input_objects::add_object(Object* obj)
void
Input_objects::check_dynamic_dependencies() const
{
+ bool issued_copy_dt_needed_error = false;
for (Dynobj_list::const_iterator p = this->dynobj_list_.begin();
p != this->dynobj_list_.end();
++p)
{
const Dynobj::Needed& needed((*p)->needed());
bool found_all = true;
- for (Dynobj::Needed::const_iterator pneeded = needed.begin();
- pneeded != needed.end();
- ++pneeded)
+ Dynobj::Needed::const_iterator pneeded;
+ for (pneeded = needed.begin(); pneeded != needed.end(); ++pneeded)
{
if (this->sonames_.find(*pneeded) == this->sonames_.end())
{
@@ -2151,6 +2151,25 @@ Input_objects::check_dynamic_dependencies() const
}
}
(*p)->set_has_unknown_needed_entries(!found_all);
+
+ // --copy-dt-needed-entries aka --add-needed is a GNU ld option
+ // --that gold does not support. However, they cause no trouble
+ // --unless there is a DT_NEEDED entry that we don't know about;
+ // --warn only in that case.
+ if (!found_all
+ && !issued_copy_dt_needed_error
+ && (parameters->options().copy_dt_needed_entries()
+ || parameters->options().add_needed()))
+ {
+ const char* optname;
+ if (parameters->options().copy_dt_needed_entries())
+ optname = "--copy-dt-needed-entries";
+ else
+ optname = "--add-needed";
+ gold_error(_("%s is not supported but is required for %s in %s"),
+ optname, (*pneeded).c_str(), (*p)->name().c_str());
+ issued_copy_dt_needed_error = true;
+ }
}
}
« 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