From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc41.google.com (mail-oo1-xc41.google.com [IPv6:2607:f8b0:4864:20::c41]) by sourceware.org (Postfix) with ESMTPS id 5FD863851C15 for ; Wed, 3 Jun 2020 12:49:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5FD863851C15 Received: by mail-oo1-xc41.google.com with SMTP id 7so468735oof.8 for ; Wed, 03 Jun 2020 05:49:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RFRgLC90OSA8sMipipUyWwGJjzeq0Q3VFzd5fz9OgRc=; b=EPtt+XVnoWeiFJDz5YHoML/phX5lQK8wLkVHD9ywnCfRa0YcBJghT/V5FUEeoAIhqZ DrMrR835oUZMycU5FxODA2bNCM6nTye3Tsoyl1zvn1W319Nn3+huUvn2yEa1i4F6VflD 73vg2FvgLc1rXm0mpgoQu8P3V66emstM7EPckuxZJDWlg2jxz3vSYhDNkHekJyCYwS1R OrumlmK1mUt4sXDCFy6ik+GrgutDZtzCOkiLNsNTTpvbg9r6wERAepp6VSJiq/8E6qSp jPYltITUl8JNGvHMnm6ZqxS5nfsVuis2pYV0dSM8nTVWHjMIKvjfOA4Hr/mcDMeyeyrL Yk7Q== X-Gm-Message-State: AOAM530mkNoiBPBmD0Un5hj2vnr64VK1VWQhnHlBlbvoOxrtjg4iZmEs 1nR8W8W4UfaDHX3VIfWtWc0TQ5epQKsqAu196E47NnLy7I4= X-Google-Smtp-Source: ABdhPJz2bF4uFvnRyGzbMcPgG/3qq/9eap+EjTrq4hKkcn5z+dyknQTY4RkbdVhqd8z4lLIYtqfJce7+vfT4zLbh6j0= X-Received: by 2002:a4a:4904:: with SMTP id z4mr4310314ooa.63.1591188545598; Wed, 03 Jun 2020 05:49:05 -0700 (PDT) MIME-Version: 1.0 References: <20200219071950.GP5570@bubble.grove.modra.org> <20200219222336.GU5570@bubble.grove.modra.org> <20200220081517.GX5570@bubble.grove.modra.org> <84e45483-76c4-eb22-b75c-51076a711b89@redhat.com> In-Reply-To: From: Christophe Lyon Date: Wed, 3 Jun 2020 14:48:54 +0200 Message-ID: Subject: Re: [PATCH] Add support for non-contiguous memory regions To: Alexander Fedotov Cc: Nick Clifton , binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2020 12:49:07 -0000 On Tue, 2 Jun 2020 at 14:49, Alexander Fedotov wrote: > > Hello Christophe > > I found it very useful feature. Thanks for the positive feedback, that's good to read. > But I'm just curious if it is possible to extend linker syntax to support syntax with output regions separated by OR : > > text : { *(.text*) } > REGION0 | REGION1 | REGION2 > I think this was discussed in the original thread, eg https://sourceware.org/legacy-ml/binutils/2017-02/msg00250.html and https://sourceware.org/legacy-ml/binutils/2017-03/msg00020.html I would look nice indeed, I just fear unexpected complications since this modifies the linker script language. Maybe some main maintainers have thoughts on the difficulty and risks of implementing this? Nick? Thanks, Christophe > It is more convenient in some cases. For example CMSIS has linker script like this: > > .text : > { > KEEP(*(.vectors)) > *(.text*) > > KEEP(*(.init)) > KEEP(*(.fini)) > > /* .ctors */ > *crtbegin.o(.ctors) > *crtbegin?.o(.ctors) > *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) > *(SORT(.ctors.*)) > *(.ctors) > > /* .dtors */ > *crtbegin.o(.dtors) > *crtbegin?.o(.dtors) > *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) > *(SORT(.dtors.*)) > *(.dtors) > > *(.rodata*) > KEEP(*(.eh_frame*)) > } > FLASH > > So that we have to duplicate this rather than use | in output regions. > > What do you think? > > Alex > > > On Fri, Mar 13, 2020 at 5:46 PM Christophe Lyon via Binutils wrote: >> >> On Fri, 13 Mar 2020 at 15:21, Nick Clifton wrote: >> > >> > Hi Christophe, >> > >> > > Ping? >> > > >> > > https://sourceware.org/pipermail/binutils/2020-February/109942.html >> > >> > Oops - sorry - the patch is good. Approved - please apply. >> > >> >> Thanks! >> Pushed as abf874aafe3d717573e4a48bf0e3c6334e666a55 >> >> Christophe >> >> > Cheers >> > Nick >> >