Don't use INTDEF/INTUSE in unwind-dw2-fde.c (bug 14132)
Joseph S. Myers
joseph@codesourcery.com
Tue Oct 28 22:41:00 GMT 2014
On Tue, 28 Oct 2014, Rich Felker wrote:
> On Tue, Oct 28, 2014 at 05:11:37PM +0000, Joseph S. Myers wrote:
> > It might be possible to eliminate those copies by making libc on affected
> > architectures dlopen shared libgcc at startup and use the functions from
> > there in the same way as done for thread cancellation, but that might not
> > be desirable given most binaries wouldn't need it (really you'd want it to
> > be dlopened only for binaries referencing those symbols; lazy opening is
> > problematic for error reporting).
>
> Doing that would be really backwards. What's needed is really the
> opposite -- getting rid of the dlopen of libgcc entirely. Right now
> pthread_cancel aborts the whole program if loading libgcc fails, and
> loading can fail for all sorts of spurious reasons.
As explained before, the dlopen helps avoid circular dependencies between
glibc and GCC when bootstrapping - it's desirable to be able to build
glibc with an initial bootstrap compiler whose libgcc was built without
libc headers or shared libc (and so is static only with limited unwinding
functionality) and have it be identical to one built after iterating a
series of alternate GCC and glibc builds. The obvious way to avoid that
failure at pthread_cancel time is to do the dlopen at libpthread startup
instead.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list