From: Dion Mendel <guix@dm9.info>
To: 47921@debbugs.gnu.org
Subject: [bug#47921] [PATCH] build: Fix elf-dynamic-info-soname.
Date: Wed, 21 Apr 2021 23:46:12 +0800 [thread overview]
Message-ID: <20210421154612.GA956@dm9.info> (raw)
In-Reply-To: <76bb70d22fed27efd4a15308abdd9e95fb1aa929.camel@telenet.be>
Thanks for the follow up.
>1. IIUC, this change would cause a world-rebuild, so this patch would
>have to applied on core-updates. The subject line should have been
>[PATCH core-updates]: etcetera.
Are you sure? This patch will modify guix.
guix graph --type=reverse-package guix
Only shows a few packages to be rebuilt. I am new to guix so I may be
wrong about this.
>2. How did you test this patch?
Tested in the repl.
Current behaviour:
(elf-dynamic-info-soname
(call-with-input-file "/path/to/libz.so.1.2.11"
(compose elf-dynamic-info parse-elf
get-bytevector-all)))
=> #<<dynamic-entry> type: 14 value: "libz.so.1" offset: 5764>
There is no way to extract the value as dynamic-entry is private to the
module.
After the patch:
(elf-dynamic-info-soname
(call-with-input-file "/path/to/libz.so.1.2.11"
(compose elf-dynamic-info parse-elf
get-bytevector-all)))
=> "libz.so.1"
>3. What does this patch fix?
Module (guix build gremlin) exports several functions to extract
information from the dynamic section of an elf file.
elf-dynamic-info-soname is one of these functions. It is not called
anywhere in guix. I would like to use it for packaging, but it is
currently non functioning.
>4. elf-dynamic-info-soname is a record accessor. Did you mean
>elf-dynamic-info?
No, I do not mean elf-dynamic-info.
elf-dynamic-info-soname is a record accessor which is currently broken
because it doesn't unwrap an internal structure, namely <dynamic-entry>.
All the other accessors unwrap this internal structure.
This patch brings this accessor into line with the others.
>5. According to the docstring (core-updates, c9a61dff8242612ae8275829a5ee31ff45ff08b1):
>
> "Return dynamic-link information for ELF as an <elf-dynamic-info> object, or
>#f if ELF lacks dynamic-link information."
>
> So this patch actually _introduces_ a bug. Or you need to modify the docstring
> as well.
No. This patch does not affect elf-dynamic-info. It fixes one of its
accessors. Nothing else is affected.
next prev parent reply other threads:[~2021-04-21 15:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-20 19:44 [bug#47921] [PATCH] build: Fix elf-dynamic-info-soname Dion Mendel
2021-04-21 2:46 ` Dion Mendel
2021-04-21 11:49 ` Maxime Devos
2021-04-21 15:46 ` Dion Mendel [this message]
2021-04-21 18:33 ` Maxime Devos
2021-04-22 3:13 ` Dion Mendel
2021-04-22 8:20 ` bug#47921: " Ludovic Courtès
2021-04-22 2:55 ` [bug#47921] retitle Dion Mendel
2021-04-22 3:26 ` [bug#47921] Include correct commit message Dion Mendel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210421154612.GA956@dm9.info \
--to=guix@dm9.info \
--cc=47921@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).