aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2017-06-07 17:49:35 -0700
committerEric Christopher <echristo@gmail.com>2017-06-21 16:19:27 -0700
commitaf417045260d4eee267e2252ceff7b012f5157b8 (patch)
treeaca2fcb901f373bf5a59c5fc4c6dcd7bc3b381fc
parentbf4b4662b33e136b27b7e9020f6b45de85d90494 (diff)
downloadgdb-af417045260d4eee267e2252ceff7b012f5157b8.zip
gdb-af417045260d4eee267e2252ceff7b012f5157b8.tar.gz
gdb-af417045260d4eee267e2252ceff7b012f5157b8.tar.bz2
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.
-rw-r--r--gold/ChangeLog11
-rw-r--r--gold/aarch64.cc18
2 files changed, 27 insertions, 2 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 4323d78..ba8223c 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,6 +1,17 @@
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
2017-05-15 Eric Christopher <echristo@gmail.com>
* layout.cc (Layout::segment_precedes): Add a case for testing
diff --git a/gold/aarch64.cc b/gold/aarch64.cc
index b207dcd..52339bb 100644
--- a/gold/aarch64.cc
+++ b/gold/aarch64.cc
@@ -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);