From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24631 invoked by alias); 11 Sep 2014 00:04:45 -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 24617 invoked by uid 89); 11 Sep 2014 00:04:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=unavailable version=3.3.2 X-HELO: mail-ob0-f180.google.com Received: from mail-ob0-f180.google.com (HELO mail-ob0-f180.google.com) (209.85.214.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 11 Sep 2014 00:04:43 +0000 Received: by mail-ob0-f180.google.com with SMTP id wp4so1307019obc.11 for ; Wed, 10 Sep 2014 17:04:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=dRNaYM0aOjXlfK0vPYkbMafAn0tkTo5jGgtysnJTxM0=; b=Rn5T/PaZE8PpVZ4KP5aniO4hV6y8TTfmpSzVdE4aWqE58NYxXyJIR85JKyfvOoVcaX 9AFRfYZXxM4olJcHBSdcucv6k2oglY/M4LWrwDLOW8uVio6TrbsB36sc3w+p6MZKF+BF jXl7s0G7oV2kvYnTmpBVlXoRPSKiT1nqiBamjIhSVT9cV9iI07JxI2jbO/0PI3UNd98c t0si2HPY3tile5eSRrr5rqkHQPihsjavK4l/N9LX6BJO3iU3UTvr7piCg2bvDci4VTn1 E7C0jYPhuD0bL1xmMH6Cl+J24xRX09JnHmpP0grfOmlfJ9v7v5TIwX469h7T7KWDRh/d 9m7A== X-Gm-Message-State: ALoCoQlc2IkaJosuFLmaBJY3ZNIS+PCHrpCPCdE0N4elXyucAslyhVjzTpLQ91mDlXJiP5srahAZ MIME-Version: 1.0 X-Received: by 10.182.226.202 with SMTP id ru10mr5064354obc.77.1410393881322; Wed, 10 Sep 2014 17:04:41 -0700 (PDT) Received: by 10.182.147.8 with HTTP; Wed, 10 Sep 2014 17:04:41 -0700 (PDT) In-Reply-To: <20140910225238.0B6362C39CF@topped-with-meat.com> References: <20140330042516.1A88E74481@topped-with-meat.com> <20140330045552.GX18201@bubble.grove.modra.org> <20140330050615.7DC5774481@topped-with-meat.com> <20140331200446.A09B074430@topped-with-meat.com> <20140331214025.E61517447E@topped-with-meat.com> <20140910225238.0B6362C39CF@topped-with-meat.com> Date: Thu, 11 Sep 2014 00:04:00 -0000 Message-ID: Subject: Re: gold vs libc From: Ian Lance Taylor To: Roland McGrath Cc: Cary Coutant , Alan Modra , "GNU C. Library" , Binutils , =?UTF-8?Q?Rafael_=C3=81vila_de_Esp=C3=ADndola?= Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00083.txt.bz2 On Wed, Sep 10, 2014 at 3:52 PM, Roland McGrath wrote: > > Incidentally, Ian mentioned Gold having had a special case for the > __EH_FRAME_BEGIN__ symbol. But 'git log -G__EH_FRAME_BEGIN -- gold' finds > no point in the history where Gold's source code mentioned that symbol. Do > you know what Ian was referring to? From > https://sourceware.org/ml/libc-alpha/2014-04/msg00021.html: > > I freely grant that GCC's crtbegin.o file tries this trick in a number > of different ways--even worse, crtend.o has trailing symbols. Because > of this existing behaviour, gold has various special cases to make it > continue to work. One of those special cases is for > __EH_FRAME_BEGIN__. As you've seen, the existing special case does > not work any more. This is an unfortunate interaction. I don't think > it's an obvious bug. I shouldn't have said __EH_FRAME_BEGIN__. There is no special case for the symbol. There is a special case for the sections found in typical crtbegin/crtend files. It's these lines in Eh_frame::add_ehframe_input_section in gold/ehframe.cc: if (contents_len == 0) return false; // If this is the marker section for the end of the data, then // return false to force it to be handled as an ordinary input // section. If we don't do this, we won't correctly handle the case // of unrecognized .eh_frame sections. if (contents_len == 4 && elfcpp::Swap<32, big_endian>::readval(pcontents) == 0) return false; Ian