This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] BZ #5784: Build libpthread.a with ld -r
On Wed, 5 Sep 2012, Alexandre Oliva wrote:
> Plus, I recall from a time long, long ago, that using -r on large
> libraries caused trouble on some platforms that had tight offset limits
> for GOT accesses. MIPS was one example, and I worked on multi-GOT to
> alleviate the problem, but merging multiple object files into one
> renders multi-GOT inoperant. I'm pretty sure I ran into some such
> issues on other platforms (alpha comes to mind) as a libtool maintainer,
> too. So... Are we sure this change won't run us afoul of such
> platform-specific ABI limits?
Large libraries in this context are things like libgcj; libpthread is a
small library.
Unfortunately there doesn't seem to be a linker script facility for
specifying that a .a file should be used with --whole-archive, or making
libpthread.a a linker script saying something like WHOLE_ARCHIVE (
libpthread_real.a ) would be another option that avoids any such -r
issues.
--
Joseph S. Myers
joseph@codesourcery.com