[Bug 973172] Re: Internal error in ld (ld.gold)
Jonas Bülow
jonas.bulow at gmail.com
Wed Apr 4 11:44:10 UTC 2012
Yes, I know the bug report is very incomplete. The problem is that I don't own the source code beeing compiled/linked.
I have not managed to create a reproducer.
Does the error message itself give any clues of whats wrong " internal
error in sized_finalize_symbol" ?
Maybe you could guide me looking for details? If I run the linker in the
debugger and break on the assert I get the following info:
template<int size>
bool
Symbol_table::sized_finalize_symbol(Symbol* unsized_sym)
{
typedef typename Sized_symbol<size>::Value_type Value_type;
Sized_symbol<size>* sym =
static_cast<Sized_symbol<size>*>(unsized_sym);
// The default version of a symbol may appear twice in the symbol
// table. We only need to finalize it once.
if (sym->has_symtab_index())
return false;
if (!sym->in_reg())
{
gold_assert(!sym->has_symtab_index());
sym->set_symtab_index(-1U);
gold_assert(sym->dynsym_index() == -1U); <==== this is the failing assert
Looking at sym gives:
(gdb) print *sym
$6 = {
<gold::Symbol> = {
name_ = 0x22963bb4 "__cxa_finalize",
version_ = 0x22963893 "GLIBC_2.2.5",
u_ = {
from_object = {
object = 0x1f657780,
shndx = 0
},
in_output_data = {
output_data = 0x1f657780,
offset_is_from_end = false
},
in_output_segment = {
output_segment = 0x1f657780,
offset_base = gold::Symbol::SEGMENT_START
}
},
symtab_index_ = 4294967295,
dynsym_index_ = 34,
got_offsets_ = {
got_type_ = 4294967295,
got_offset_ = 0,
got_next_ = 0x0
},
plt_offset_ = 4294967295,
type_ = elfcpp::STT_FUNC,
binding_ = elfcpp::STB_WEAK,
visibility_ = elfcpp::STV_DEFAULT,
nonvis_ = 0,
source_ = gold::Symbol::FROM_OBJECT,
is_def_ = false,
is_forwarder_ = false,
has_alias_ = false,
needs_dynsym_entry_ = false,
in_reg_ = false,
in_dyn_ = true,
needs_dynsym_value_ = false,
has_warning_ = false,
is_copied_from_dynobj_ = false,
is_forced_local_ = false,
is_ordinary_shndx_ = true,
in_real_elf_ = true,
is_defined_in_discarded_section_ = false,
undef_binding_set_ = false,
undef_binding_weak_ = false,
is_predefined_ = false
},
members of gold::Sized_symbol<64>:
value_ = 0,
symsize_ = 0
}
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to binutils in Ubuntu.
https://bugs.launchpad.net/bugs/973172
Title:
Internal error in ld (ld.gold)
Status in “binutils” package in Ubuntu:
Incomplete
Bug description:
After upgrading from 11.04 to 11.10 ld fails to link some
applications:
/usr/bin/ld: internal error in sized_finalize_symbol, at
../../gold/symtab.cc:2663
Workaround: change ld to point to ld.bfd
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/973172/+subscriptions
More information about the foundations-bugs
mailing list