Subversion Repositories HelenOS

Rev

Rev 2999 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2999 Rev 3772
Line 35... Line 35...
35
#ifndef DYNAMIC_H_
35
#ifndef DYNAMIC_H_
36
#define DYNAMIC_H_
36
#define DYNAMIC_H_
37
 
37
 
38
#include <bool.h>
38
#include <bool.h>
39
#include <elf_dyn.h>
39
#include <elf_dyn.h>
-
 
40
#include <arch/dynamic.h>
40
 
41
 
41
/**
42
/**
42
 * Holds the data extracted from an ELF Dynamic section.
43
 * Holds the data extracted from an ELF Dynamic section.
43
 *
44
 *
44
 * The data is already pre-processed: Pointers are adjusted
45
 * The data is already pre-processed: Pointers are adjusted
45
 * to their final run-time values by adding the load bias
46
 * to their final run-time values by adding the load bias
46
 * and indices into the symbol table are converted to pointers.
47
 * and indices into the symbol table are converted to pointers.
47
 */
48
 */
48
typedef struct {
49
typedef struct dyn_info {
49
    /** Type of relocations used for the PLT, either DT_REL or DT_RELA */
50
    /** Type of relocations used for the PLT, either DT_REL or DT_RELA */
50
    int plt_rel;
51
    int plt_rel;
51
 
52
 
52
    /** Relocation table without explicit addends */
53
    /** Relocation table without explicit addends */
53
    void *rel;
54
    void *rel;
Line 90... Line 91...
90
    /* Assume for now that there's at most one needed library */
91
    /* Assume for now that there's at most one needed library */
91
    char *needed;
92
    char *needed;
92
 
93
 
93
    /** Pointer to the module's dynamic section */
94
    /** Pointer to the module's dynamic section */
94
    elf_dyn_t *dynamic;
95
    elf_dyn_t *dynamic;
-
 
96
 
-
 
97
    /** Architecture-specific info. */
-
 
98
    dyn_info_arch_t arch;
95
} dyn_info_t;
99
} dyn_info_t;
96
 
100
 
97
void dynamic_parse(elf_dyn_t *dyn_ptr, size_t bias, dyn_info_t *info);
101
void dynamic_parse(elf_dyn_t *dyn_ptr, size_t bias, dyn_info_t *info);
-
 
102
void dyn_parse_arch(elf_dyn_t *dp, size_t bias, dyn_info_t *info);
98
 
103
 
99
#endif
104
#endif
100
 
105
 
101
/** @}
106
/** @}
102
 */
107
 */