diff options
author | Alan Modra <amodra@gmail.com> | 2014-12-03 16:17:23 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-12-04 09:23:59 +1030 |
commit | 1611bc4afb0f08f0aff64ec355b8d68e9f4f0a73 (patch) | |
tree | 6fbb005db969d5584029e9869561afd960a61fd7 /gold/symtab.cc | |
parent | 858339f2b7aafe199c1cd07fc8d4a7c8130aa285 (diff) | |
download | gdb-1611bc4afb0f08f0aff64ec355b8d68e9f4f0a73.zip gdb-1611bc4afb0f08f0aff64ec355b8d68e9f4f0a73.tar.gz gdb-1611bc4afb0f08f0aff64ec355b8d68e9f4f0a73.tar.bz2 |
powerpc gold, work around pr17670
pr17670 is about an assert triggering on a branch to an undefined
weak symbol, the symbol being undefined due to dropping its comdat
group section. (Well sort of. The symbol is actually defined in
an .opd section which isn't part of the group, but the code section
the opd entry points at is dropped.) So don't assert.
Also, don't make long branch stubs to such symbols, and arrange to
have target-reloc.h code warn when applying relocs that use the sym.
PR 17670
* symtab.cc (Symbol::set_undefined): Remove assertion.
* powerpc.cc (Target_powerpc::symval_for_branch): Don't assert
on symbols defined in discarded sections, instead return false.
Rearrange params, update all callers.
(Target_powerpc::Branch_info::make_stub): Don't make stubs for
branches to syms in discarded sections.
(Global_symbol_visitor_opd::operator()): Set discarded opd syms
undefined and flag as discarded.
(Target_powerpc::Relocate::relocate): Localize variable.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc index 70fb3f0..c433018 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -547,7 +547,6 @@ Symbol::set_output_segment(Output_segment* os, Segment_offset_base base) void Symbol::set_undefined() { - gold_assert(this->is_predefined_); this->source_ = IS_UNDEFINED; this->is_predefined_ = false; } |