usermode/library/mcore/src/module.c File Reference

#include <err.h>
#include <fcntl.h>
#include <gelf.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sysexits.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <unistd.h>
#include "module.h"
#include "files.h"
#include "list.h"
#include "debug.h"

Go to the source code of this file.

Functions

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)
 Relocates symbols that fall in the range of addresses by offsetting their addresses stored in the global offset table (GOT).
m_result_t m_module_create_module_dsr_list (struct list_head *module_dsr_listp)

Variables

list_head module_dsr_list


Detailed Description

Implements the routines defined in module.h.

Author:
Haris Volos <hvolos@cs.wisc.edu>

Definition in file module.c.


Function Documentation

m_result_t m_module_create_module_dsr_list ( struct list_head module_dsr_listp  ) 

Retrieve the list of loaded modules (e.g. libraries) that need to have their persistent data section mapped into this process.

Parameters:
module_dsr_listp should point to the head of the list. This structure will be written with the list of modules which should be loaded in this address space.

Definition at line 224 of file module.c.

References module_dsr_s::list.

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 
)

Relocates symbols that fall in the range of addresses by offsetting their addresses stored in the global offset table (GOT).

Note: The actual data are not transferred. This function only hijacks the global offset table.

Definition at line 68 of file module.c.


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