aboutsummaryrefslogtreecommitdiff
path: root/gold/powerpc.cc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-08-31 12:34:36 +0930
committerAlan Modra <amodra@gmail.com>2016-08-31 12:34:36 +0930
commitafe002dd6619560c569ac0e080cbf220c826f989 (patch)
tree9dedf74577849057d340a04391d0ee2086a6b9c8 /gold/powerpc.cc
parent6c95c841109309563e4436e0bd1a33464c847bd7 (diff)
downloadgdb-afe002dd6619560c569ac0e080cbf220c826f989.zip
gdb-afe002dd6619560c569ac0e080cbf220c826f989.tar.gz
gdb-afe002dd6619560c569ac0e080cbf220c826f989.tar.bz2
[GOLD] Add debug output for powerpc section grouping
* debug.h (DEBUG_TARGET): New. (DEBUG_ALL): Add DEBUG_TARGET. (gold_debug): Delete FORMAT param. * powerpc.cc (Stub_control::can_add_to_stub_group): Print debug ourput.
Diffstat (limited to 'gold/powerpc.cc')
-rw-r--r--gold/powerpc.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index d0dd672..1d5cd97 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -2522,6 +2522,13 @@ Stub_control::can_add_to_stub_group(Output_section* o,
i->relobj()->name().c_str(),
i->relobj()->section_name(i->shndx()).c_str());
+ gold_debug(DEBUG_TARGET, "maybe add%s %s:%s size=%#llx total=%#llx",
+ has14 ? " 14bit" : "",
+ i->relobj()->name().c_str(),
+ i->relobj()->section_name(i->shndx()).c_str(),
+ (long long) this_size,
+ (long long) this->group_end_addr_ - start_addr);
+
this->has14_ = this->has14_ || has14;
group_size = this->has14_ ? this->stub14_group_size_ : this->stub_group_size_;
@@ -2579,6 +2586,8 @@ Stub_control::can_add_to_stub_group(Output_section* o,
gold_unreachable();
}
+ gold_debug(DEBUG_TARGET, "nope, didn't fit\n");
+
// The section fails to fit in the current group. Set up a few
// things for the next group. owner_ and output_section_ will be
// set later after we've retrieved those values for the current