From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 703C23846457 for ; Tue, 9 Mar 2021 07:40:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 703C23846457 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-126-x-_qhrZ0PCeRO9Kn8yjNmQ-1; Tue, 09 Mar 2021 02:40:27 -0500 X-MC-Unique: x-_qhrZ0PCeRO9Kn8yjNmQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7199C801814; Tue, 9 Mar 2021 07:40:26 +0000 (UTC) Received: from [10.36.113.27] (ovpn-113-27.ams2.redhat.com [10.36.113.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9CE5B6F971; Tue, 9 Mar 2021 07:40:25 +0000 (UTC) Subject: Re: [PATCH] define SHT_LLVM_ADDRSIG section rather than error out To: Mark Wielaard , Navin P Cc: elfutils-devel@sourceware.org References: <1d931491-9672-62c0-363b-73facdc8ed09@redhat.com> From: =?UTF-8?Q?Timm_B=c3=a4der?= Message-ID: <91acb27a-97f5-5de5-1baa-a263d35486fd@redhat.com> Date: Tue, 9 Mar 2021 08:40:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2021 07:40:33 -0000 On 04/03/2021 14:59, Mark Wielaard wrote: > Hi Timm, > > On Thu, 2021-03-04 at 14:44 +0100, Timm Bäder wrote: >> any update on this? I see that SHT_LLVM_ADDRSIG is still not in upstream >> glibc. Are you working on that, Navin? >> >> As for the checks, I'm not sure we can do anything here since elfutils >> can't know whether a symbol is rightfully marked as address-significant. > > I tried to lookup some more information about SHT_LLVM_ADDRSIG, but > couldn't really find much. There is this comment about it from the > binutils maintainers: > https://www.sourceware.org/bugzilla/show_bug.cgi?id=23817#c1 Hm, that is unfortunate of course. I can't find a bug report about this in llvm's bugzilla. I could try to get a discussion going there. Are you opposed to work around this in elflint in the meantime? E.g. ignore all sections starting with 'llvm_'? diff --git a/src/elflint.c b/src/elflint.c index 85cc7833..9a40045c 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -3766,6 +3766,9 @@ cannot get section header for section [%2zu] '%s': %s\n"), const char *scnname = elf_strptr (ebl->elf, shstrndx, shdr->sh_name); + if (strncmp (scnname, ".llvm_", 6) == 0) + continue; + if (scnname == NULL) ERROR (_("section [%2zu]: invalid name\n"), cnt); else (But I guess that belong after the NULL check) Or does elflint use the any llvm_ section? Asking because they only exist when compiling with clang of course and elflint not handling (or ignoring) them causes the testsuite to fail. - Timm -- Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Charles Cachera, Michael O'Neill, Tom Savage, Eric Shander