]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2017-06-21 Eric Christopher <echristo@gmail.com>
authorEric Christopher <echristo@gmail.com>
Thu, 8 Jun 2017 00:49:35 +0000 (17:49 -0700)
committerEric Christopher <echristo@gmail.com>
Wed, 21 Jun 2017 23:19:27 +0000 (16:19 -0700)
        Apply from master
        2017-06-07  Eric Christopher  <echristo@gmail.com>

        * aarch64.cc (maybe_apply_stub): Add debug logging for looking
        up stubs to undefined symbols and early return rather than
        fail to look them up.
        (scan_reloc_for_stub): Add debug logging for no stub creation
        for undefined symbols.

gold/ChangeLog
gold/aarch64.cc

index 4323d783ad3a53f0aa4cdb6dbad9d742c6653be2..ba8223c07c1d07df28d512274db1c5e22fa89d66 100644 (file)
@@ -1,3 +1,14 @@
+2017-06-21  Eric Christopher  <echristo@gmail.com>
+
+       Apply from master
+        2017-06-07  Eric Christopher  <echristo@gmail.com>
+
+       * aarch64.cc (maybe_apply_stub): Add debug logging for looking
+       up stubs to undefined symbols and early return rather than
+       fail to look them up.
+       (scan_reloc_for_stub): Add debug logging for no stub creation
+       for undefined symbols.
+
 2017-06-21  Eric Christopher  <echristo@gmail.com>
 
        Apply from master
index b207dcdc3da31edd71d62e48d6b6cb818897e3bf..52339bbf3fdbdf6702512cd91fb4277e78ee06ea 100644 (file)
@@ -3739,8 +3739,13 @@ Target_aarch64<size, big_endian>::scan_reloc_for_stub(
          psymval = &symval;
        }
       else if (gsym->is_undefined())
-       // There is no need to generate a stub symbol is undefined.
-       return;
+       {
+         // There is no need to generate a stub symbol is undefined.
+          gold_debug(DEBUG_TARGET,
+                     "stub: not creating a stub for undefined symbol %s in file %s",
+                     gsym->name(), aarch64_relobj->name().c_str());
+          return;
+       }
     }
 
   // Get the symbol value.
@@ -5398,6 +5403,15 @@ maybe_apply_stub(unsigned int r_type,
 
   const The_aarch64_relobj* aarch64_relobj =
       static_cast<const The_aarch64_relobj*>(object);
+  // We don't create stubs for undefined symbols so don't look for one.
+  if (gsym && gsym->is_undefined())
+    {
+      gold_debug(DEBUG_TARGET,
+                "stub: looking for a stub for undefined symbol %s in file %s",
+                gsym->name(), aarch64_relobj->name().c_str());
+      return false;
+    }
+
   The_stub_table* stub_table = aarch64_relobj->stub_table(relinfo->data_shndx);
   gold_assert(stub_table != NULL);