From patchwork Wed Apr 21 02:46:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dion Mendel X-Patchwork-Id: 28728 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4F19427BC7A; Wed, 21 Apr 2021 14:14:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B603127BC79 for ; Wed, 21 Apr 2021 14:14:28 +0100 (BST) Received: from localhost ([::1]:59596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZCgV-0001tA-SH for patchwork@mira.cbaines.net; Wed, 21 Apr 2021 09:14:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZ2tK-0002Zq-Kg for guix-patches@gnu.org; Tue, 20 Apr 2021 22:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45005) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZ2tJ-000865-KV for guix-patches@gnu.org; Tue, 20 Apr 2021 22:47:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lZ2tJ-0002qh-Hm for guix-patches@gnu.org; Tue, 20 Apr 2021 22:47:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47921] [PATCH] build: Fix elf-dynamic-info-soname. References: <20210420194429.GB29387@dm9.info> In-Reply-To: <20210420194429.GB29387@dm9.info> Resent-From: Dion Mendel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Apr 2021 02:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47921 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47921@debbugs.gnu.org Received: via spool by 47921-submit@debbugs.gnu.org id=B47921.161897322010944 (code B ref 47921); Wed, 21 Apr 2021 02:47:01 +0000 Received: (at 47921) by debbugs.gnu.org; 21 Apr 2021 02:47:00 +0000 Received: from localhost ([127.0.0.1]:56551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZ2tI-0002qS-4l for submit@debbugs.gnu.org; Tue, 20 Apr 2021 22:47:00 -0400 Received: from cyan.elm.relay.mailchannels.net ([23.83.212.47]:18413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZ2tF-0002qJ-JK for 47921@debbugs.gnu.org; Tue, 20 Apr 2021 22:46:58 -0400 X-Sender-Id: dreamhost|x-authsender|smtp@dm9.info Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 410ED1E258A for <47921@debbugs.gnu.org>; Wed, 21 Apr 2021 02:46:56 +0000 (UTC) Received: from pdx1-sub0-mail-a78.g.dreamhost.com (100-105-161-119.trex.outbound.svc.cluster.local [100.105.161.119]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 716C21E23E1 for <47921@debbugs.gnu.org>; Wed, 21 Apr 2021 02:46:55 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|smtp@dm9.info Received: from pdx1-sub0-mail-a78.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.105.161.119 (trex/6.1.1); Wed, 21 Apr 2021 02:46:56 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|smtp@dm9.info X-MailChannels-Auth-Id: dreamhost X-Zesty-Share: 249fdbd90f408ffc_1618973216079_2431200060 X-MC-Loop-Signature: 1618973216079:3651069109 X-MC-Ingress-Time: 1618973216079 Received: from pdx1-sub0-mail-a78.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a78.g.dreamhost.com (Postfix) with ESMTP id 2FCEC8BC2B for <47921@debbugs.gnu.org>; Tue, 20 Apr 2021 19:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=dm9.info; h=date:from:to :subject:message-id:mime-version:content-type; s=dm9.info; bh=Qw SLmtj3V/x3fkToWU44CbkSb58=; b=1aPQKg/vHCQji1RogIPs+yjUMmOpBz5XiK 1yNcbqsleWRE+StYaGYGxQxnbPGHqiAWG8dMm2C9Ih63Y1a3HWbWANJqy+edgmF0 2KMeHKjmynGTKbUBovcXzbsUjfCKPgkVmQnSfYbionNbWZHcqxRD2T944kA77Jhi Uadz4y5oE= Received: from mail.localdomain (61-245-140-70.3df58c.per.nbn.aussiebb.net [61.245.140.70]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: smtp@dm9.info) by pdx1-sub0-mail-a78.g.dreamhost.com (Postfix) with ESMTPSA id E158F8B930 for <47921@debbugs.gnu.org>; Tue, 20 Apr 2021 19:46:54 -0700 (PDT) Received: by mail.localdomain (Postfix, from userid 2001) id BF4504FF0D7; Wed, 21 Apr 2021 10:46:50 +0800 (AWST) Date: Wed, 21 Apr 2021 10:46:50 +0800 X-DH-BACKEND: pdx1-sub0-mail-a78 From: Dion Mendel Message-ID: <20210421024650.GA30794@dm9.info> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Wed, 21 Apr 2021 09:14:22 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Oops, forgot to refactor. Replacement patch attached. Rationale: The elf-dynamic-info-soname function is currently implemented but unused. The current implementation does not work as it omits unwrapping the dynamic-entry record. This patch makes the function work as intended. From b15d9d708900f6713e5f40afdce66f3bb443e36b Mon Sep 17 00:00:00 2001 From: Dion Mendel Date: Wed, 21 Apr 2021 10:36:32 +0800 Subject: [PATCH] build: Fix elf-dynamic-info-soname. * guix/build/gremlin.scm (elf-dynamic-info-soname): Return the value of the dynamic-entry instead of the dynamic-entry record. --- guix/build/gremlin.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guix/build/gremlin.scm b/guix/build/gremlin.scm index e8ea66dfb3..4710502426 100644 --- a/guix/build/gremlin.scm +++ b/guix/build/gremlin.scm @@ -215,7 +215,9 @@ string table if the type is a string." (#f #f) ((? elf-segment? dynamic) (let ((entries (dynamic-entries elf dynamic))) - (%elf-dynamic-info (find (matching-entry DT_SONAME) entries) + (%elf-dynamic-info (and=> (find (matching-entry DT_SONAME) + entries) + dynamic-entry-value) (filter-map (lambda (entry) (and (= (dynamic-entry-type entry) DT_NEEDED) -- 2.31.0