diff options
author | Ben Cheng <bccheng@google.com> | 2012-11-01 14:19:35 -0700 |
---|---|---|
committer | Ben Cheng <bccheng@google.com> | 2012-11-01 14:27:04 -0700 |
commit | 6d5ce99288a663253fd2cde30516257f754cc776 (patch) | |
tree | d57b8b65cf7b807324908da748ba1845b8e2941a /binutils-2.22/gold/resolve.cc | |
parent | 6b95f5ef54a29597409e24d7fe6670238d58ff04 (diff) | |
download | toolchain_binutils-6d5ce99288a663253fd2cde30516257f754cc776.zip toolchain_binutils-6d5ce99288a663253fd2cde30516257f754cc776.tar.gz toolchain_binutils-6d5ce99288a663253fd2cde30516257f754cc776.tar.bz2 |
Refresh binutils to 2.22.90.
Missing local patches will be added after.
Change-Id: I7e5f7529f165a48db48a07f08b85f36c2faa8d4a
Diffstat (limited to 'binutils-2.22/gold/resolve.cc')
-rw-r--r-- | binutils-2.22/gold/resolve.cc | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/binutils-2.22/gold/resolve.cc b/binutils-2.22/gold/resolve.cc index 1119f38..0da8da2 100644 --- a/binutils-2.22/gold/resolve.cc +++ b/binutils-2.22/gold/resolve.cc @@ -296,7 +296,7 @@ Symbol_table::resolve(Sized_symbol<size>* to, // Record if we've seen this symbol in a real ELF object (i.e., the // symbol is referenced from outside the world known to the plugin). - if (object->pluginobj() == NULL) + if (object->pluginobj() == NULL && !object->is_dynamic()) to->set_in_real_elf(); // If we're processing replacement files, allow new symbols to override @@ -356,9 +356,15 @@ Symbol_table::resolve(Sized_symbol<size>* to, &adjust_dyndef)) { elfcpp::STB tobinding = to->binding(); + typename Sized_symbol<size>::Value_type tovalue = to->value(); this->override(to, sym, st_shndx, is_ordinary, object, version); - if (adjust_common_sizes && tosize > to->symsize()) - to->set_symsize(tosize); + if (adjust_common_sizes) + { + if (tosize > to->symsize()) + to->set_symsize(tosize); + if (tovalue > to->value()) + to->set_value(tovalue); + } if (adjust_dyndef) { // We are overriding an UNDEF or WEAK UNDEF with a DYN DEF. @@ -368,8 +374,13 @@ Symbol_table::resolve(Sized_symbol<size>* to, } else { - if (adjust_common_sizes && sym.get_st_size() > tosize) - to->set_symsize(sym.get_st_size()); + if (adjust_common_sizes) + { + if (sym.get_st_size() > tosize) + to->set_symsize(sym.get_st_size()); + if (sym.get_st_value() > to->value()) + to->set_value(sym.get_st_value()); + } if (adjust_dyndef) { // We are keeping a DYN DEF after seeing an UNDEF or WEAK UNDEF. |