This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gold vs libc
- From: Alan Modra <amodra at gmail dot com>
- To: Rafael Espíndola <rafael dot espindola at gmail dot com>
- Cc: Cary Coutant <ccoutant at google dot com>, Ian Lance Taylor <iant at google dot com>, Roland McGrath <roland at hack dot frob dot com>, "GNU C. Library" <libc-alpha at sourceware dot org>, Binutils <binutils at sourceware dot org>
- Date: Thu, 11 Sep 2014 10:02:47 +0930
- Subject: Re: gold vs libc
- Authentication-results: sourceware.org; auth=none
- References: <20140330042516 dot 1A88E74481 at topped-with-meat dot com> <20140330045552 dot GX18201 at bubble dot grove dot modra dot org> <20140330050615 dot 7DC5774481 at topped-with-meat dot com> <CAKOQZ8wPgdHfA9QJWQ9yVO9gVQKL=HF-rpuipCBxzsx3=TcqwA at mail dot gmail dot com> <20140331200446 dot A09B074430 at topped-with-meat dot com> <CAKOQZ8x19YZ_oyJXyxe9JST4nfaG8dDvVrdf-vmgkNWydrpsrw at mail dot gmail dot com> <20140331214025 dot E61517447E at topped-with-meat dot com> <CAKOQZ8x1W0YxJSq+X74EjMj7_02uTZq82qzhmF=oQ-cTd4S1mQ at mail dot gmail dot com> <CAHACq4oRKDGKAUu3octDCxKg2EueCyf8kHWj0t8g9+LmE3JagQ at mail dot gmail dot com> <CAG3jReKPZn713vQyU_oBbixeR7WmQH0n5KpV4KvU2RfpSivabA at mail dot gmail dot com>
On Wed, Sep 10, 2014 at 06:05:26PM -0400, Rafael Espíndola wrote:
> > If the .eh_frame data in crt1.o really does need to come before
> > __EH_FRAME_BEGIN__, another thing you could do is simply make it so
> > gold treats it as non-optimizable. Adding a null relocation to the
> > first word of the section should do it; inserting a zero-length entry
> > anywhere but the end would do it (if that doesn't have adverse affects
> > elsewhere).
>
> Since the problem comes from an optimizations that knows what
> .eh_frame is, maybe it could learn that __EH_FRAME_BEGIN__ and
> __EH_FRAME_END__ are special symbols marking the start and end of the
> section?
I'm inclined to think this is the best solution (and made a comment to
that effect in pr17366 before reading this thread). I don't like the
idea of making .eh_frame optimisation depend on --eh-frame-hdr.
Providing a sorted list of FDEs is really separate to optimising those
FDEs and CIEs.
--
Alan Modra
Australia Development Lab, IBM