From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6488 invoked by alias); 30 Mar 2014 05:09:16 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 6459 invoked by uid 89); 30 Mar 2014 05:09:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: topped-with-meat.com Received: from toast.topped-with-meat.com (HELO topped-with-meat.com) (204.197.218.159) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 30 Mar 2014 05:09:11 +0000 Received: by topped-with-meat.com (Postfix, from userid 5281) id 7DC5774481; Sat, 29 Mar 2014 22:06:15 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Alan Modra Cc: "GNU C. Library" , binutils@sourceware.org Subject: Re: gold vs libc In-Reply-To: Alan Modra's message of Sunday, 30 March 2014 15:25:52 +1030 <20140330045552.GX18201@bubble.grove.modra.org> References: <20140330042516.1A88E74481@topped-with-meat.com> <20140330045552.GX18201@bubble.grove.modra.org> Message-Id: <20140330050615.7DC5774481@topped-with-meat.com> Date: Sun, 30 Mar 2014 05:09:00 -0000 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=Rt9WckWK c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=Z6MIti7PxpgA:10 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=CCpqsmhAAAAA:8 a=_nDKahRGOEHY1lTgjwcA:9 a=CjuIK1q_8ugA:10 a=tuZxXSEABhwA:10 X-SW-Source: 2014-03/txt/msg00312.txt.bz2 > https://sourceware.org/bugzilla/show_bug.cgi?id=14675 Thanks. In fact, CFI in crt1.o is useful for the debugger (which doesn't care where __EH_FRAME_BEGIN__ points). See: https://sourceware.org/ml/libc-alpha/2012-03/msg00573.html for why we added it. In the (more common) dynamic linking case, it works fine because __EH_FRAME_BEGIN__ is not used. Insteaad, --eh-frame-hdr is used at link time so PT_GNU_EH_FRAME can be used at runtime. I don't know why we don't do it that way for static linking too. The binary-search table is a worthwhile optimization for everybody. AFAICT if we just started passing --eh-frame-hdr and stopped using crt{begin,end}T.o instead of crt{begin,end}.o under -static it would work as is. dl_iterate_phdr in the static case should already find the program's own phdr so libgcc can find PT_GNU_EH_FRAME in there and be happy. But given the status quo, gold should do something more like what ld does. Thanks, Roland