*** empty log message ***
[deliverable/binutils-gdb.git] / gold / resolve.cc
index 6e3d3acce37ff0d2625b77640f4846f57ca93a6b..63ed5e7207449c7a89c7aee459be0efaeab40c4d 100644 (file)
@@ -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.
 
@@ -676,6 +680,7 @@ Symbol::override_base_with_special(const Symbol* from)
   gold_assert(!from->has_plt_offset_);
   gold_assert(!from->has_warning_);
   gold_assert(!from->is_copied_from_dynobj_);
+  gold_assert(!from->is_forced_local_);
 }
 
 // Override a symbol with a special symbol.
@@ -715,6 +720,8 @@ Symbol_table::override_with_special(Sized_symbol<size>* tosym,
        }
       while (ssym != tosym);
     }
+  if (tosym->binding() == elfcpp::STB_LOCAL)
+    this->force_local(tosym);
 }
 
 // Instantiate the templates we need.  We could use the configure
This page took 0.024476 seconds and 4 git commands to generate.