From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) by sourceware.org (Postfix) with ESMTPS id EEABD3853804 for ; Fri, 28 Jan 2022 23:37:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EEABD3853804 Received: by mail-qv1-xf2b.google.com with SMTP id o9so7288338qvy.13 for ; Fri, 28 Jan 2022 15:37:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mbeR2/3EzJv/2FnBXeZ/ImtuUSZTBFbmzE5YUHdeac0=; b=ZbYvCsOueuPbOKoyp96GHQlHHqy4lMjC43RfWmnUAmDuszLcC1X2h99g9GiOEtPYYt dP7xvel0xFEdREHTpK1KX+qyCeOoIXU0p2KtRXyNkzKTXPRj2NNsB/6x9/4z7g5y6vUu E6qTt3R5isclCSYRidfpyL3H71xFNJQ1oXJv1hDFyPxeTtLQNOgGw3qVeFMTzRNa0srC iACP9CWB2dD4xEaarVJ3Nqc+1Ru0imLwLBaUMNT5rMQT9VsuuVcohaFc/JMl/+Ihhrot DZPSOloFTT3VVJHg2QsZDIyEdVs7JYeCr08c/5QyK/jXqw15X9YmqJk8mx9J5ikyW6Sg h7WA== X-Gm-Message-State: AOAM5339oahVCQ5axyDRS2/CB0dKhZuaGXgJnQ92NC4YowzFo0zYqA76 jxsXZYvc8N0pTrvQYW/2QSNCam5KeQ== X-Google-Smtp-Source: ABdhPJwpy18OsHdUlAKy20CiFWTizvDaP5qs3HQux72knAYO76PNqTRFWZFjkIa4iMLVu3vyHVPzDg== X-Received: by 2002:a05:6214:1d0b:: with SMTP id e11mr9612165qvd.32.1643413067642; Fri, 28 Jan 2022 15:37:47 -0800 (PST) Received: from bytedance (ec2-52-52-7-82.us-west-1.compute.amazonaws.com. [52.52.7.82]) by smtp.gmail.com with ESMTPSA id bp39sm4380876qkb.99.2022.01.28.15.37.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 15:37:47 -0800 (PST) Date: Fri, 28 Jan 2022 15:37:43 -0800 From: Peilin Ye To: Alan Modra Cc: binutils@sourceware.org, Cong Wang , Peilin Ye , Nick Clifton Subject: Re: [RFC PATCH] bfd: Handle objcopy --only-keep-debug in _bfd_elf_init_private_section_data() Message-ID: <20220128233743.GA67604@bytedance> References: <20220128035817.65910-1-yepeilin.cs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Fri, 28 Jan 2022 23:37:49 -0000 Hi Nick and Alan, Thanks for the suggestion! I tried both approaches but wasn't sure which one is better. I've tested v2 with the binutils testsuite. On Fri, Jan 28, 2022 at 11:22:36PM +1030, Alan Modra wrote: > Do you have a testcase we could add to the binutils testsuite? Not yet, I just noticed that we have a keep_debug_symbols_and_test_copy() test in objcopy.exp, I can take a look later today if needed. Thanks, Peilin Ye