From Cary Coutant: Fix last patch.
authorIan Lance Taylor <iant@google.com>
Thu, 24 Jan 2008 00:51:57 +0000 (00:51 +0000)
committerIan Lance Taylor <iant@google.com>
Thu, 24 Jan 2008 00:51:57 +0000 (00:51 +0000)
gold/symtab.h

index 8110e4a..f5acd20 100644 (file)
@@ -508,18 +508,11 @@ class Symbol
       return true;
 
     // A function call that can branch to a local PLT entry does not need
-    // a dynamic relocation.
-    if ((flags & FUNCTION_CALL) && this->has_plt_offset())
-      return false;
-
-    // A non-pic pc-relative function call in a shared library whose target
-    // is defined in the same load module does not need a dynamic relocation.
-    // Even if the target is preemptible, we will bind directly, since we
-    // cannot use a PLT entry in this case.
+    // a dynamic relocation.  A non-pic pc-relative function call in a
+    // shared library cannot use a PLT entry.
     if ((flags & FUNCTION_CALL)
-        && (flags & NON_PIC_REF)
-        && this->is_defined()
-        && parameters->output_is_shared())
+        && this->has_plt_offset()
+        && !((flags & NON_PIC_REF) && parameters->output_is_shared()))
       return false;
 
     // A reference to any PLT entry in a non-position-independent executable