This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] alpha-elf vs copy_indirect_symbol


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~

Attachment: d-alpha-cis
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]