mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
gremlin: 'elf-dynamic-info' returns a file name rathern than a dynamic entry.
* guix/build/gremlin.scm (elf-dynamic-info): Return the dynamic entry
value, not the dynamic entry.
* tests/gremlin.scm ("elf-dynamic-info-soname"): New test.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
committed by
Ludovic Courtès
parent
a24562af52
commit
1010171280
@@ -160,4 +160,22 @@
|
||||
(close-pipe pipe)
|
||||
str)))))))
|
||||
|
||||
(unless c-compiler
|
||||
(test-skip 1))
|
||||
(test-equal "elf-dynamic-info-soname"
|
||||
"libfoo.so.2"
|
||||
(call-with-temporary-directory
|
||||
(lambda (directory)
|
||||
(with-directory-excursion directory
|
||||
(call-with-output-file "t.c"
|
||||
(lambda (port)
|
||||
(display "// empty file" port)))
|
||||
(invoke c-compiler "t.c"
|
||||
"-shared" "-Wl,-soname,libfoo.so.2")
|
||||
(let* ((dyninfo (elf-dynamic-info
|
||||
(parse-elf (call-with-input-file "a.out"
|
||||
get-bytevector-all))))
|
||||
(soname (elf-dynamic-info-soname dyninfo)))
|
||||
soname)))))
|
||||
|
||||
(test-end "gremlin")
|
||||
|
||||
Reference in New Issue
Block a user