[RFC] alpha-elf vs copy_indirect_symbol
Richard Henderson
rth@redhat.com
Tue Jun 14 16:14:00 GMT 2011
A while ago I (finally) added support for --gc-sections to the
alpha backend. Unfortunately at the time I'd been testing GCC
with --disable-shared, to make things easier to manage in my
cross-build setup. While the original patch worked for the ld
testsuite, it ran into problems linking the shared libstdc++.
Alpha had been using its own fixup routine for versioned symbols,
which it ran during always_size_sections. Unfortunately, this
runs after the mark+sweep, which means that the gc_sweep_hook
was seeing invalid data, which lead directly to the crash.
I presume without any archaeology that Alpha's version symbol
fixup routine pre-dates the copy_indirect_symbol hook. Not
that it matters, I suppose, it's got to be fixed now.
The following patch appears to fix the problem. Certainly there's
no longer an ld crash building gcc+binutils w/ all languages.
However, I've yet to adjust my cross-built setup to handle the
shared libraries, so I havn't actually tested everything properly.
What concerns me is that copy_indirect_symbol is called for things
that aren't indirect symbols. In particular, we call this hook for
defweak and defined symbols. Which might be fine, I suppose, if we
then *replaced* the defweak symbol in the sym_hashes table so that
we never ever see it again. I have no idea what the current usage
is supposed to accomplish.
Comments?
r~
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: d-alpha-cis
URL: <https://sourceware.org/pipermail/binutils/attachments/20110614/e3641fce/attachment.ksh>
More information about the Binutils
mailing list