This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] 2017-06-07 Eric Christopher <echristo at gmail dot com>
- From: Eric Christopher <echristo at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 8 Jun 2017 00:55:55 -0000
- Subject: [binutils-gdb] 2017-06-07 Eric Christopher <echristo at gmail dot com>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=81b6fe3bf9f3be2b6b81d05d08ac58d2a6dcb760
commit 81b6fe3bf9f3be2b6b81d05d08ac58d2a6dcb760
Author: Eric Christopher <echristo@gmail.com>
Date: Wed Jun 7 17:49:35 2017 -0700
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.
Diff:
---
gold/ChangeLog | 8 ++++++++
gold/aarch64.cc | 18 ++++++++++++++++--
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 1f7d01e..e3c4472 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,11 @@
+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-05-23 Alan Modra <amodra@gmail.com>
PR 21503
diff --git a/gold/aarch64.cc b/gold/aarch64.cc
index c9bb6b7..2470986 100644
--- a/gold/aarch64.cc
+++ b/gold/aarch64.cc
@@ -3746,8 +3746,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.
@@ -5405,6 +5410,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);