1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 09:10:22 +02:00

add ELF loader

* libguile/objcodes.h:
* libguile/objcodes.c (scm_load_thunk_from_file)
  (scm_load_thunk_from_memory): New procedures.

* libguile/elf.h: Import from glibc.  Not installed.

* libguile/Makefile.am: Adapt for elf.h.

* module/system/vm/objcode.scm: (load-thunk-from-file)
  (load-thunk-from-memory): New exports.
This commit is contained in:
Andy Wingo 2012-06-01 21:33:46 +02:00
parent 83e7c58408
commit afc74c2920
5 changed files with 3352 additions and 3 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2001, 2009, 2010, 2011 Free Software Foundation, Inc.
/* Copyright (C) 2001, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@ -60,6 +60,9 @@ struct scm_objcode
#define SCM_OBJCODE_NATIVE_CODE(x) (SCM_CELL_WORD_3 (x))
#define SCM_SET_OBJCODE_NATIVE_CODE(x, code) (SCM_SET_CELL_WORD_3 (x, code))
SCM_API SCM scm_load_thunk_from_file (SCM filename);
SCM_API SCM scm_load_thunk_from_memory (SCM bv);
SCM_API SCM scm_c_make_objcode_slice (SCM parent, const scm_t_uint8 *ptr);
SCM_API SCM scm_load_objcode (SCM file);
SCM_API SCM scm_objcode_p (SCM obj);