From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7678 invoked by alias); 2 Feb 2014 01:20:15 -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 7669 invoked by uid 89); 2 Feb 2014 01:20:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,FSL_HELO_BARE_IP_2,RCVD_IN_DNSWL_NONE,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: plane.gmane.org Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 02 Feb 2014 01:20:13 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W9lj9-0008O2-6Q for binutils@sourceware.org; Sun, 02 Feb 2014 02:20:07 +0100 Received: from 198.95.226.40 ([198.95.226.40]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 02 Feb 2014 02:20:03 +0100 Received: from ancafe by 198.95.226.40 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 02 Feb 2014 02:20:03 +0100 To: binutils@sourceware.org From: Kevin Subject: Re: gold linker: Access section start & end address w/o using a linker script Date: Sun, 02 Feb 2014 01:20:00 -0000 Message-ID: References: <10A84606-654D-4FBC-A66D-40BA39916061@gmail.com> <0263B7F5-194E-42D0-A8BB-608F0593ED61@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00005.txt.bz2 Ian Lance Taylor google.com> writes: > > On Mon, Apr 22, 2013 at 4:39 AM, Raphael Zulliger gmail.com> wrote: > > > > Is there a chance to enhance gold to better support such use cases? Or is that out-of focus for gold? I'm not > familiar with linking internals, but I think that providing additional start/end address symbols for> section names starting with a '.' wouldn't be that tricky to be added, right? > > I'm fine with it. Look for uses of is_cident in the gold source code. > > Ian > > Thanks for the tip Ian. In that routine one could easily ignore a leading ".". In abstract one might want to handle "." inside the name, or translate characters (such as "$") allowed in ELF symbols but not in C (or in some other language), whereby a simple concept starts to get out of hand; thus: - Could we assume that standard ELF section names can be mapped to C identifiers just by mapping the leading "."? - What mapping would you suggest? If the leading "." is dropped then the resulting would collide with a common name (text or data in particular). This problem seems unsolvable in general, so should one make an effort at all (mapping "." to a single underscore for example)?