summaryrefslogtreecommitdiff
path: root/module/system/vm/objcode.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-04-28 14:23:20 +0200
committerAndy Wingo <wingo@pobox.com>2013-05-23 14:19:06 +0200
commite1aee492d7e419b590d627bd70459b90700187ae (patch)
treee8a374a7a5eb526d8106e047465091d69ce53340 /module/system/vm/objcode.scm
parent0b3b73698c92081ad3c24f40203d8f34e82778a3 (diff)
downloadguile-e1aee492d7e419b590d627bd70459b90700187ae.tar.gz
refactor and simplify ELF loader in objcodes.c
* libguile/objcodes.c (sniff_elf_alignment, alloc_aligned) (copy_and_align_elf_data): New helpers for portably re-aligning ELF data from read(2) or from a bytevector. (load_thunk_from_memory): Simplify! Now there is only one procedure that loads ELF, and it does less: it simply receives the whole image in one array, hopefully from mmap. (scm_load_thunk_from_file): Use new map_file_contents helper, and go through load_thunk_from_memory. (scm_load_thunk_from_memory): Pass load_thunk_from_memory a piece of memory that it owns, and that is appropriately aligned.
Diffstat (limited to 'module/system/vm/objcode.scm')
0 files changed, 0 insertions, 0 deletions