diff options
author | Alan Modra <amodra@gmail.com> | 2015-04-28 13:28:29 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2015-04-28 13:38:56 +0930 |
commit | 6ec65f28db6b718b505e2ee5c34a274ba07397ae (patch) | |
tree | e71457862617eb74a5c43a6fffc0b929ad7f758b /gold/powerpc.cc | |
parent | 2eb639cbe4baa33545ca008d6054ea5db1d8f6a8 (diff) | |
download | gdb-6ec65f28db6b718b505e2ee5c34a274ba07397ae.zip gdb-6ec65f28db6b718b505e2ee5c34a274ba07397ae.tar.gz gdb-6ec65f28db6b718b505e2ee5c34a274ba07397ae.tar.bz2 |
PowerPC gold assertion on missing global entry stub
Global entry stubs are used on ELFv2 to provide addresses for
functions not defined in a non-PIC executable but whose address is
taken, in much the same way as PLT stub code is used on other
targets to provide function addresses. We don't want to insert a
global entry stub just because (bogus) debug info refers to the
address of a non-local function, but we also don't want gold to die.
* powerpc.cc (Target_powerpc::Relocate::relocate): Don't assert
on missing global entry stub due to bogus debug info.
Diffstat (limited to 'gold/powerpc.cc')
-rw-r--r-- | gold/powerpc.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc index fddf3fa..3d753b5 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -6836,8 +6836,11 @@ Target_powerpc<size, big_endian>::Relocate::relocate( && !is_branch_reloc(r_type)) { unsigned int off = target->glink_section()->find_global_entry(gsym); - gold_assert(off != (unsigned int)-1); - value = target->glink_section()->global_entry_address() + off; + if (off != (unsigned int)-1) + { + value = target->glink_section()->global_entry_address() + off; + has_stub_value = true; + } } else { @@ -6859,8 +6862,8 @@ Target_powerpc<size, big_endian>::Relocate::relocate( rela.get_r_addend()); gold_assert(off != invalid_address); value = stub_table->stub_address() + off; + has_stub_value = true; } - has_stub_value = true; } if (r_type == elfcpp::R_POWERPC_GOT16 |