diff options
author | Ian Lance Taylor <iant@google.com> | 2008-01-09 19:57:45 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2008-01-09 19:57:45 +0000 |
commit | e5756efb6d46f569d2e99d19f726b32b84f58bd7 (patch) | |
tree | 953c35bf025a640d99bccbd4acbce67dc8b677b5 /gold/resolve.cc | |
parent | cda30489fc0f7870150158863780d67f5efedd90 (diff) | |
download | binutils-e5756efb6d46f569d2e99d19f726b32b84f58bd7.zip binutils-e5756efb6d46f569d2e99d19f726b32b84f58bd7.tar.gz binutils-e5756efb6d46f569d2e99d19f726b32b84f58bd7.tar.bz2 |
Support assignments and expressions in linker scripts.
Diffstat (limited to 'gold/resolve.cc')
-rw-r--r-- | gold/resolve.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gold/resolve.cc b/gold/resolve.cc index 6e3d3ac..7062ccc 100644 --- a/gold/resolve.cc +++ b/gold/resolve.cc @@ -1,6 +1,6 @@ // resolve.cc -- symbol resolution for gold -// Copyright 2006, 2007 Free Software Foundation, Inc. +// Copyright 2006, 2007, 2008 Free Software Foundation, Inc. // Written by Ian Lance Taylor <iant@google.com>. // This file is part of gold. @@ -277,11 +277,15 @@ Symbol_table::should_override(const Symbol* to, unsigned int frombits, { *adjust_common_sizes = false; - unsigned int tobits = symbol_to_bits(to->binding(), - (to->source() == Symbol::FROM_OBJECT - && to->object()->is_dynamic()), - to->shndx(), - to->type()); + unsigned int tobits; + if (to->source() == Symbol::FROM_OBJECT) + tobits = symbol_to_bits(to->binding(), + to->object()->is_dynamic(), + to->shndx(), + to->type()); + else + tobits = symbol_to_bits(to->binding(), false, elfcpp::SHN_ABS, + to->type()); // FIXME: Warn if either but not both of TO and SYM are STT_TLS. |