diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-08-22 18:14:04 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-08-22 18:14:04 +0200 |
commit | 233df51ebc162bf95dfadf914914cbfbc6984651 (patch) | |
tree | 06fa8d78bbe97619450a88d8a38d01dc3775655b /gnu/build | |
parent | 43cec3fb1ea54dedee8a5f613c833958c76892f4 (diff) | |
parent | 180a8986e57a6cfb65a8cddabcb430f23801832b (diff) | |
download | patches-233df51ebc162bf95dfadf914914cbfbc6984651.tar patches-233df51ebc162bf95dfadf914914cbfbc6984651.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/build')
-rw-r--r-- | gnu/build/linux-modules.scm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gnu/build/linux-modules.scm b/gnu/build/linux-modules.scm index 9c8761527a..ae141b6f54 100644 --- a/gnu/build/linux-modules.scm +++ b/gnu/build/linux-modules.scm @@ -58,11 +58,10 @@ (define (section-contents elf section) "Return the contents of SECTION in ELF as a bytevector." - (let* ((modinfo (elf-section-by-name elf ".modinfo")) - (contents (make-bytevector (elf-section-size modinfo)))) - (bytevector-copy! (elf-bytes elf) (elf-section-offset modinfo) + (let ((contents (make-bytevector (elf-section-size section)))) + (bytevector-copy! (elf-bytes elf) (elf-section-offset section) contents 0 - (elf-section-size modinfo)) + (elf-section-size section)) contents)) (define %not-nul @@ -85,7 +84,8 @@ string list." key/value pairs.." (let* ((bv (call-with-input-file file get-bytevector-all)) (elf (parse-elf bv)) - (modinfo (section-contents elf ".modinfo"))) + (section (elf-section-by-name elf ".modinfo")) + (modinfo (section-contents elf section))) (map key=value->pair (nul-separated-string->list (utf8->string modinfo))))) |