My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
elf_loader.h
Go to the documentation of this file.
1 /*
2  * OpenVirtualization:
3  * For additional details and support contact developer@sierraware.com.
4  * Additional documentation can be found at www.openvirtualization.org
5  *
6  * Copyright (C) 2010-2014 SierraWare
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  *
22  */
23 #ifndef _ELF_LOADER_H
24  *
25  * Elf loader implementation
26  *
27  */
28 
29 #define _ELF_LOADER_H
30 #include <task.h>
31 #define ELF_FLAG (0x7245)
32 #define ELF_FLAG_MAP (0x5859)
33 
45 int elf_load( sa_config_t *conf);
46 
52 int elf_loader_cleanup(void);
53 
58 {
59  unsigned long addr;
60  const char *symbol;
61 };
62 
63 /* For every exported symbol, place a struct in the __ksymtab section */
64 #define __EXPORT_SYMBOL(sym, sec) \
65  extern __typeof__(sym) sym; \
66  static const char __kstrtab_##sym[] \
67  __attribute__((section("__ksymtab_strings"), aligned(1))) \
68  = #sym; \
69  static const struct kernel_symbol __ksymtab_##sym \
70  __attribute__((section("__ksymtab" sec), unused)) \
71  = { (unsigned long)&sym, __kstrtab_##sym }
72 
73 #define EXPORT_SYMBOL(sym) \
74  __EXPORT_SYMBOL(sym, "")
75 
76 #endif
Secure API configuration details for task.
Definition: task.h:40
Definition: elf_loader.h:57
int elf_load(sa_config_t *conf)
the main elf loader function
const char * symbol
Definition: elf_loader.h:60
int elf_loader_cleanup(void)
cleans up the reserved secure memory region
unsigned long addr
Definition: elf_loader.h:59