From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by sourceware.org (Postfix) with ESMTPS id D0E4B3858435 for ; Thu, 3 Nov 2022 02:11:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D0E4B3858435 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.alibaba.com X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=rjiejie@linux.alibaba.com;NM=1;PH=DS;RN=2;SR=0;TI=SMTPD_---0VTq3FJT_1667441494; Received: from 30.221.116.54(mailfrom:rjiejie@linux.alibaba.com fp:SMTPD_---0VTq3FJT_1667441494) by smtp.aliyun-inc.com; Thu, 03 Nov 2022 10:11:35 +0800 Message-ID: <30787b1e-ddd1-6841-17ff-bf75773a20ff@linux.alibaba.com> Date: Thu, 3 Nov 2022 10:11:34 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v2] Support multiple .eh_frame sections To: Nick Clifton , binutils@sourceware.org References: <20220729074837.82957-1-rjiejie@linux.alibaba.com> <20221102080112.33378-1-rjiejie@linux.alibaba.com> <9e232c97-b0c7-763e-bcc6-f998716a35fd@redhat.com> From: Jojo R In-Reply-To: <9e232c97-b0c7-763e-bcc6-f998716a35fd@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00,BODY_8BITS,ENV_AND_HDR_SPF_MATCH,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 在 2022/11/2 20:21, Nick Clifton 写道: > Hi Jojo, > >>     This patch is based on MULTIPLE_FRAME_SECTIONS and >> EH_FRAME_LINKONCE, >>     it allows backend to enable this feature and use '--gc-sections' >> simply. > > Do you (or your employer) have a copyright assignment on file with the > FSF for > contributions to the GNU Binutils project ?  If not, are you willing > to contribute > the patch with a DCO attached ? https://developercertificate.org/ > Yes, we have signed the assignment of FSF :) > >>   _bfd_elf_default_action_discarded (asection *sec) >>   { >> +  const struct elf_backend_data *bed; >> +  bed = get_elf_backend_data (sec->owner); >> + >> +  if (bed->elf_backend_can_make_multiple_eh_frame >> +      && strncmp (sec->name, ".eh_frame.", 10) == 0) >> +    return 0; >> + >>     if (sec->flags & SEC_DEBUGGING) >>       return PRETEND; > > I think that this test would be better if it was moved down a few lines, > until it was just after this test: > >   if (strcmp (".eh_frame", sec->name) == 0) >     return 0; > Fixed. > >> +      exp.X_op = O_symbol; >> +      exp.X_add_symbol = (symbolS *) local_symbol_make (cseg->name, >> cseg, 0, frch->frch_root);; >> +      exp.X_add_number = 0; > > The arguments to local_symbol_make() are in the wrong order: > >   struct local_symbol *local_symbol_make (const char *, segT, fragS *, > valueT); > > Ie the frag should come before the value. > > Also there is a double semi-colon at the end of the line. Fixed. > > Cheers >   Nick