From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 7023E3857829 for ; Wed, 29 Jun 2022 02:57:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7023E3857829 Received: by mail-pl1-x632.google.com with SMTP id jh14so12815271plb.1 for ; Tue, 28 Jun 2022 19:57:02 -0700 (PDT) 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=fOJujZ5sK97I94+DSOchAU5eKSlqmOdcnndJUNnAJ4c=; b=dOdwfK1hzDX4EpSnVu5DlE0KGzUe+6qWmJBW0sdVY+eGo1HEtPpozontmkFUc5sJHm apX/FthDD9wYiNJQZCtX4Aaa6yBYoJqByjWhH9bffYlpZCL8aNWlJfzbC19KItjov1Ld vJLIBV7iMdL79Bzvx0UDNA8/Q1zbVXoc+TJbJdpCWis6kB7ixucLmDADneEtXJdEetuS WvDM0a2D9kqgNvxdHMerKOCXk5fRxABYYhCoXFo1NJVVSNvOhgDYEeP2MYUaTQNrX7S0 VCXzZGCK4DpA20+Ku+kVsa9sGdWGFCNo96MXS4ihlv6cr88hh9+NG+hyJOAga0X4BBTP /r7Q== X-Gm-Message-State: AJIora+0Y8/FSTx+PZTydwbjw1zOq5ir5XnXTDO2D2fPLk4dxPhSX3Gg bvYIqyzlOMndZSUCH7wKBtyDYffFU+o= X-Google-Smtp-Source: AGRyM1vCjHu2jaEQiTT7TCmjdtk3+erLTW2hCkQUG+AT+tNDHWMPGAL2k4h7RvIcW2zQRulYuOuIeQ== X-Received: by 2002:a17:90a:6b45:b0:1e3:3cfa:3104 with SMTP id x5-20020a17090a6b4500b001e33cfa3104mr3260887pjl.113.1656471421500; Tue, 28 Jun 2022 19:57:01 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:db07:f3da:c248:d229]) by smtp.gmail.com with ESMTPSA id z5-20020a056a00240500b005255165be67sm10289645pfh.23.2022.06.28.19.57.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 19:57:00 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 0A96F1140138; Wed, 29 Jun 2022 12:26:58 +0930 (ACST) Date: Wed, 29 Jun 2022 12:26:58 +0930 From: Alan Modra To: Tatsuyuki Ishi Cc: binutils@sourceware.org, Jan Beulich , Fangrui Song Subject: Re: [PATCH v2 0/6] gas: Add support for LLVM addrsig and addrsig_sym. Message-ID: References: <20220623151353.62139-1-ishitatsuyuki@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3028.8 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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, 29 Jun 2022 02:57:03 -0000 On Wed, Jun 29, 2022 at 10:27:17AM +0900, Tatsuyuki Ishi wrote: > You're right. It seems that the way I numbered the symbols wasn't > quite right. I'll get it fixed by the next revision. It isn't going to be easy. The problem is that elf symbol ordering is done by bfd/elf.c:elf_map_symbols, which isn't called until there is some file output triggering _bfd_elf_compute_section_file_positions. So you can't fill out .llvm_addrsig until quite late, but you need its size earlier for layout. Exact sizing isn't going to be possible due to uleb128 ecoding of symbol index. You can likely get a reasonable upper bound. -- Alan Modra Australia Development Lab, IBM