diff options
author | Matt Fleming <matt.fleming@intel.com> | 2013-01-29 14:01:07 +0000 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-01-29 15:11:28 +0000 |
commit | bf20364b582c383b4927f898de213b1cc0981a80 (patch) | |
tree | 5412e0c14cf74df0d7ea29ff182e23d3281aac3e /com32/include/sys | |
parent | afd985f6eec18a0f66a8fc55f9c5e3431128310f (diff) | |
parent | a2d79191b501276026a0a16ec2fa664630a20476 (diff) | |
download | syslinux-bf20364b582c383b4927f898de213b1cc0981a80.tar.gz |
Merge tag 'syslinux-5.01' into firmwaresyslinux-6.00-pre4
Conflicts:
Makefile
NEWS
com32/cmenu/Makefile
com32/elflink/ldlinux/Makefile
com32/gfxboot/Makefile
com32/gpllib/Makefile
com32/include/sys/module.h
com32/lib/Makefile
com32/lib/sys/module/elf_module.c
com32/menu/Makefile
com32/rosh/Makefile
com32/samples/Makefile
core/init.c
mk/elf.mk
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/include/sys')
-rw-r--r-- | com32/include/sys/exec.h | 21 | ||||
-rw-r--r-- | com32/include/sys/module.h | 23 |
2 files changed, 11 insertions, 33 deletions
diff --git a/com32/include/sys/exec.h b/com32/include/sys/exec.h index ac05c276..f4559d15 100644 --- a/com32/include/sys/exec.h +++ b/com32/include/sys/exec.h @@ -34,27 +34,6 @@ extern int spawn_load(const char *name, int argc, char **argv); /** - * exec_init - Initialize the dynamic execution environment. - * - * Among others, it initializes the module subsystem and loads the root - * module into memory. You should note the difference between the module - * management API, and the execution API: - * - the module system is a static one - it only manages the data structures - * and their relationship. It does not describe the way modules are executed, - * when and how they are loaded/unloaded, etc. It acts as a service layer for - * the execution API. - * - the execution environment is the dynamic part of the SYSLINUX dynamic - * module API - it implements the behavior of the modules: it - * triggers the execution of initialization and termination functions for - * libraries, executes the modules marked as executable, handles dynamic - * memory cleanup, etc. In other words, at this layer the code and data - * loaded by the lower module layer gets to be executed by the CPU, - * thus becoming part of the SYSLINUX environment. - */ -extern int exec_init(void); - - -/** * spawnv - Executes a program in the current environment. * @name: the name of the program to spawn, including the extension * (e.g. 'hello.c32') diff --git a/com32/include/sys/module.h b/com32/include/sys/module.h index 02778fbf..c1d42531 100644 --- a/com32/include/sys/module.h +++ b/com32/include/sys/module.h @@ -199,6 +199,17 @@ extern struct list_head modules_head; list_for_each_entry_safe(m, n, &modules_head, list) /** + * module_current - return the module at the head of the module list. + */ +static inline struct elf_module *module_current(void) +{ + struct elf_module *head; + + head = list_entry((&modules_head)->next, typeof(*head), list); + return head; +} + +/** * modules_init - initialize the module subsystem. * * This function must be called before any module operation is to be performed. @@ -242,18 +253,6 @@ extern int module_load(struct elf_module *module); /** - * module_load_shallow - loads a shallow ELF module into memory. - * @module: the module descriptor returned by module_alloc. - * - * The function reads the module file, checks whether the file has a valid - * structure, then loads into memory the module metadata. The metadata currently - * contains a symbol table that describes code & data allocated by other means. - * Its current use is to describe the root COM32 module to the rest of the - * module subsystem. - */ -extern int module_load_shallow(struct elf_module *module, Elf_Addr base_addr); - -/** * module_unload - unloads the module from the system. * @module: the module descriptor structure. * |