From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by sourceware.org (Postfix) with ESMTPS id BBB2F3857C7F for ; Tue, 29 Sep 2020 13:48:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BBB2F3857C7F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wr1-f66.google.com with SMTP id j2so5478044wrx.7 for ; Tue, 29 Sep 2020 06:48:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/F2Gkn8fN1xzgEl258IpNViFKn4M0VJbMkY/JDuW17Y=; b=bbT/55hEllsdDTajj1zdRlxbFManejjMHCYHcDw0Zq+pjx2jGrh0ie/9xKpRJs1u6d U/NYtOMSDjP+OZd3VjJcCh9dsP23n/d0n5tCNZtX0T79sxaKl+m2SgHER4swMtNG0X9t wj18vqbWCN3bQCgVn35GuHJrP00nmiDOmE8G/sMdnhXDfaLiGrTrIJrOI6g90SVby5s6 r3eldfjtSFKb9/nbj/VErvIBC04GGhDomRC0k05Zkd+aYOv3fCge4nPBPm837JO9kMno H1ZnZbLYU5+0lCZRU2Y3Z5fMWAQoB+fP/AvVMRnLtESvWOoBlKEgV0CxGx10UvXI831B /Ciw== X-Gm-Message-State: AOAM5303i4b0OIK/fHbhBQXOe3hioYdWwwoFhJNwfVv3pixZILEAxJ7Z X/CR/uuN5Y5cHPF4A0J32So6mMoPDzy5Pg== X-Google-Smtp-Source: ABdhPJwx04HPWZMmF6hHwmib4lC2c9x04agB63zV3g77qX7yI78a3TQ1OfF61HUz+/2O9r82UZPEQA== X-Received: by 2002:adf:eb04:: with SMTP id s4mr4808047wrn.81.1601387295947; Tue, 29 Sep 2020 06:48:15 -0700 (PDT) Received: from ?IPv6:2001:8a0:f905:5600:eefd:c63:53e0:3e8a? ([2001:8a0:f905:5600:eefd:c63:53e0:3e8a]) by smtp.gmail.com with ESMTPSA id e13sm6528352wre.60.2020.09.29.06.48.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Sep 2020 06:48:14 -0700 (PDT) Subject: Re: [PATCH] Support SHF_GNU_RETAIN ELF section flag To: Michael Matz References: <20200922202933.kgflmtnwzkdrmrvs@jozef-acer-manjaro> <20200928122822.nql5aatbpo7kr5si@jozef-acer-manjaro> <7982913d-90a3-c435-d152-b18f46cad62c@palves.net> Cc: binutils@sourceware.org From: Pedro Alves Message-ID: <810fbf87-ed6d-9d11-62ba-c92dd75b52b8@palves.net> Date: Tue, 29 Sep 2020 14:48:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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: Tue, 29 Sep 2020 13:48:19 -0000 On 9/29/20 2:18 PM, Michael Matz wrote: > We should remember that this thread is about the addition of the section > flag, which affects but isn't directly related to how it's going to be > used in source code in a high level language. If it's the pre-existing > "used" or a new "retain" attribute, or an attribute at all or just left to > section markers or pragmas: a discussion about that doesn't need to hold > up the addition of the ELF feature. I never suggested that it should (hold up the ELF feature). I was replying to this in the original message: > The overall intention for this new flag is to enable a new "retain" > attribute to be applied to declarations of functions and data in the > source code. This attribute can be used to ensure the definition > associated with the declaration is present in the linked output file, > even if linker garbage collection would normally remove the containing > section because it is unused. Discussing the intention of a new proposed mechanism seems apropos. Sometimes the high level usage model influences the low level design too.