diff mbox series

[bug#47921] build: Fix elf-dynamic-info-soname.

Message ID 20210421024650.GA30794@dm9.info
State Accepted
Headers show
Series [bug#47921] build: Fix elf-dynamic-info-soname. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Dion Mendel April 21, 2021, 2:46 a.m. UTC
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.
diff mbox series

Patch

From b15d9d708900f6713e5f40afdce66f3bb443e36b Mon Sep 17 00:00:00 2001
From: Dion Mendel <guix@dm9.info>
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