This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Don't use INTDEF/INTUSE in unwind-dw2-fde.c (bug 14132)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Rich Felker <dalias at libc dot org>
- Cc: Carlos O'Donell <carlos at redhat dot com>, <libc-alpha at sourceware dot org>
- Date: Tue, 28 Oct 2014 22:41:46 +0000
- Subject: Re: Don't use INTDEF/INTUSE in unwind-dw2-fde.c (bug 14132)
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1410222356390 dot 5108 at digraph dot polyomino dot org dot uk> <544FB8B0 dot 8080101 at redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1410281654080 dot 23740 at digraph dot polyomino dot org dot uk> <20141028200028 dot GQ22465 at brightrain dot aerifal dot cx>
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