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

Unified Diff: binutils/gold/symtab.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/symtab.h ('k') | binutils/gold/testsuite/Makefile.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: binutils/gold/symtab.cc
diff --git a/binutils/gold/symtab.cc b/binutils/gold/symtab.cc
index 5dbab35b73b4c79509102576456bc08ac822bd22..45c07c9eb024c5755ae500b949cc3bd2aebd3e5b 100644
--- a/binutils/gold/symtab.cc
+++ b/binutils/gold/symtab.cc
@@ -2242,6 +2242,12 @@ Symbol_table::set_dynsym_indexes(unsigned int index,
// Record any version information.
if (sym->version() != NULL)
versions->record_version(this, dynpool, sym);
+
+ // If the symbol is defined in a dynamic object and is
+ // referenced in a regular object, then mark the dynamic
+ // object as needed. This is used to implement --as-needed.
+ if (sym->is_from_dynobj() && sym->in_reg())
+ sym->object()->set_is_needed();
}
}
« no previous file with comments | « binutils/gold/symtab.h ('k') | binutils/gold/testsuite/Makefile.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698