From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25571 invoked by alias); 22 Apr 2013 11:39:40 -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 25561 invoked by uid 89); 22 Apr 2013 11:39:39 -0000 X-Spam-SWARE-Status: No, score=-5.6 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE autolearn=ham version=3.3.1 Received: from mail-we0-f172.google.com (HELO mail-we0-f172.google.com) (74.125.82.172) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 22 Apr 2013 11:39:39 +0000 Received: by mail-we0-f172.google.com with SMTP id r3so6276262wey.3 for ; Mon, 22 Apr 2013 04:39:36 -0700 (PDT) X-Received: by 10.180.73.173 with SMTP id m13mr50326008wiv.27.1366630776783; Mon, 22 Apr 2013 04:39:36 -0700 (PDT) Received: from [192.168.100.150] (248-67.62-81.cust.bluewin.ch. [81.62.67.248]) by mx.google.com with ESMTPS id n48sm40070919eeg.12.2013.04.22.04.39.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Apr 2013 04:39:35 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: gold linker: Access section start & end address w/o using a linker script From: Raphael Zulliger In-Reply-To: Date: Mon, 22 Apr 2013 11:39:00 -0000 Cc: "binutils@sourceware.org" Content-Transfer-Encoding: quoted-printable Message-Id: <0263B7F5-194E-42D0-A8BB-608F0593ED61@gmail.com> References: <10A84606-654D-4FBC-A66D-40BA39916061@gmail.com> To: Ian Lance Taylor X-SW-Source: 2013-04/txt/msg00223.txt.bz2 Thanks. Is there a chance to enhance gold to better support such use cases? Or is t= hat out-of focus for gold? I'm not familiar with linking internals, but I t= hink that providing additional start/end address symbols for section names = starting with a '.' wouldn't be that tricky to be added, right? On Apr 21, 2013, at 9:42 PM, Ian Lance Taylor wrote: > On Sun, Apr 21, 2013 at 12:27 PM, Raphael Zulliger wr= ote: >> Thanks Ian! >> __start_SECNAME / __stop_SECNAME: I've been googling for something like = this almost for hours=85 >>=20 >> That certainly answers my question for "project specific" section names.= But I cant see yet how it solve my question for pre-defined sections like = .sbss, .sdata, etc.? Is there another trick I don't know yet? E.g. can I cr= eate section-aliasses or something like that? (again, a short google sessio= n didn't give useful results) >=20 > Yes, for those sections you do need to use a linker script, or to > arrange for some file defining the appropriate symbols to be at the > start and end of your link. >=20 > For specialized purposes like this you do need to use a linker script > with gold. gold is optimized to not use a linker script for the > ordinary case of a hosted system. It's OK to use a linker script for > an embedded system. >=20 > Ian