* guix/build/gremlin.scm (<dynamic-entry>): New record type.
(raw-dynamic-entries): Return a list of <dynamic-entry>.
(dynamic-entries): Adjust accordingly and return a list of <dynamic-entry>.
(elf-dynamic-info)[matching-entry]: New procedure.
Use it.
* guix/build/gremlin.scm (expand-variable, expand-origin): New
procedures.
(validate-needed-in-runpath): Map 'expand-origin' to the RUNPATH field
of DYNINFO.
* tests/gremlin.scm ("expand-origin"): New test.
* guix/build/gremlin.scm (validate-needed-in-runpath)[runpath]:
Add (filter absolute-file-name? ...).
Emit a warning when RUNPATH file names that do not match
'store-file-name?'. Change format of error message to begin with file
name.
* guix/build/utils.scm (store-file-name?): New procedure.
* guix/build/gremlin.scm (&elf-error, &invalid-segment-size): New error
condition types.
(dynamic-link-segment): Compare SEGMENT's offset + size to ELF's total
size.
(validate-needed-in-runpath): Wrap body in 'guard' form.