usermode/library/mcore/src/module.h

00001 /*
00002     Copyright (C) 2011 Computer Sciences Department, 
00003     University of Wisconsin -- Madison
00004 
00005     ----------------------------------------------------------------------
00006 
00007     This file is part of Mnemosyne: Lightweight Persistent Memory, 
00008     originally developed at the University of Wisconsin -- Madison.
00009 
00010     Mnemosyne was originally developed primarily by Haris Volos
00011     with contributions from Andres Jaan Tack.
00012 
00013     ----------------------------------------------------------------------
00014 
00015     Mnemosyne is free software; you can redistribute it and/or
00016     modify it under the terms of the GNU General Public License
00017     as published by the Free Software Foundation, version 2
00018     of the License.
00019  
00020     Mnemosyne is distributed in the hope that it will be useful,
00021     but WITHOUT ANY WARRANTY; without even the implied warranty of
00022     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023     GNU General Public License for more details.
00024 
00025     You should have received a copy of the GNU General Public License
00026     along with this program; if not, write to the Free Software
00027     Foundation, Inc., 51 Franklin Street, Fifth Floor, 
00028     Boston, MA  02110-1301, USA.
00029 
00030 ### END HEADER ###
00031 */
00032 
00033 #ifndef _MNEMOSYNE_MODULE_H
00034 #define _MNEMOSYNE_MODULE_H
00035 
00036 #include <stdint.h>
00037 #include <gelf.h>
00038 #include "result.h"
00039 #include "list.h"
00040 
00042 #define M_MODULE_PATH_MAX 256
00043 
00044 
00052 typedef struct module_dsr_s module_dsr_t;
00053 struct module_dsr_s {
00054         char             module_path[M_MODULE_PATH_MAX]; 
00055         uint64_t         module_inode;          
00056         uintptr_t        module_start;          
00057         int              fd;                    
00058         Elf              *elf;                  
00059         GElf_Shdr        GOT_shdr;              
00060         GElf_Shdr        persistent_shdr;       
00061     Elf_Scn          *persistent_scn;       
00062         struct list_head list;                  
00063 };
00064 
00065 extern struct list_head module_dsr_list;
00066 
00067 m_result_t m_module_create_module_dsr_list(struct list_head *module_dsr_listp);
00068 void m_module_relocate_symbols(uintptr_t got_start, uintptr_t got_end, uintptr_t old_start, uintptr_t old_end, uintptr_t new_start, uintptr_t new_end);
00069 
00070 #endif /* _MNEMOSYNE_MODULE_H */

Generated on Sat Apr 23 11:43:36 2011 for Mnemosyne by  doxygen 1.4.7