From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11203 invoked by alias); 28 Apr 2011 16:48:20 -0000 Received: (qmail 11187 invoked by uid 22791); 28 Apr 2011 16:48:18 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Apr 2011 16:48:01 +0000 Received: (qmail 796 invoked from network); 28 Apr 2011 16:48:00 -0000 Received: from unknown (HELO ?10.0.2.15?) (clm@127.0.0.2) by mail.codesourcery.com with ESMTPA; 28 Apr 2011 16:48:00 -0000 Message-ID: <4DB99A38.1010801@codesourcery.com> Date: Thu, 28 Apr 2011 16:48:00 -0000 From: Catherine Moore User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: binutils@sourceware.org, Catherine Moore Subject: Comments requested for proposed for ld scripting language extension Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2011-04/txt/msg00428.txt.bz2 I've been working on a binutils port to the Freescale VLE part, more specifically, on interlinking. For those not familiar with the requirements, interlinking is a bit different than for other ports such as ARM and MIPS. There are no special call instructions or mode switches. BookE and VLE instructions can be intermixed as long as they reside in separate ELF sections. The VLE instruction sections are marked with a PowerPC-specific section header (SHF_PPC_VLE). Because we have so many "specially named" sections .gnu.linkonce, .text, .init, and friends, I want to avoid a scheme that relies on a naming convention to differentiate between VLE sections and BookE sections. What I would like to do is add an extension to the scripting language. Something like this: MEMORY { ram (rwx) : ORIGIN = 0x100000, LENGTH = 144M } SECTIONS { .text : WITHOUT_FLAGS (SHF_PPC_VLE) { *(.text .text.* .gnu.linkonce.t.*) } >ram .text_vle : WITH_FLAGS (SHF_PPC_VLE) { *(.text .text.* .gnu.linkonce.t.*) } >ram } map_input_to_output_sections would then walk the input sections for those sections with an optional "FLAG" marker. A callback would be introduced that would examine the ELF header flags for the input sections and gather only those that met the criteria. I realize that this is an ELF-centric proposal. Although it could be extended to include other object formats, I haven't given that aspect alot of thought. Before I spend time on development, I'd like to solicit comments ahead of time. How do the maintainers and others feel about this plan? Thanks, Catherine