#include <assert.h>
#include <string.h>
#include "ElfHelper.hpp"
#include "RelocateCubin.hpp"
Go to the source code of this file.
|
static size_t | sectionOffset (Elf_SectionVector *sections, unsigned sindex) |
|
static void | applyRelocation (void *addr, unsigned rel_type, uint64_t rel_value) |
|
static void | applyRELrelocation (char *line_map, Elf_SymbolVector *symbol_values, GElf_Rel *rel) |
|
static void | applyRELArelocation (char *debug_info, Elf_SymbolVector *symbol_values, GElf_Rela *rela) |
|
static void | applyLineMapRelocations (Elf_SymbolVector *symbol_values, char *line_map, int n_relocations, Elf_Data *relocations_data) |
|
static void | relocateLineMap (char *cubin_ptr, Elf *elf, Elf_SectionVector *sections, Elf_SymbolVector *symbol_values) |
|
static void | applyDebugInfoRelocations (Elf_SymbolVector *symbol_values, char *debug_info, int n_relocations, Elf_Data *relocations_data) |
|
static void | relocateDebugInfo (char *cubin_ptr, Elf *elf, Elf_SectionVector *sections, Elf_SymbolVector *symbol_values) |
|
static Elf_SymbolVector * | relocateSymbolsHelper (Elf *elf, GElf_Ehdr *ehdr, GElf_Shdr *shdr, Elf_SectionVector *sections, Elf_Scn *scn) |
|
static Elf_SymbolVector * | relocateSymbols (Elf *elf, Elf_SectionVector *sections) |
|
static void | relocateProgramDataSegments (Elf *elf, Elf_SectionVector *sections) |
|
bool | relocateCubin (char *cubin_ptr, Elf *cubin_elf) |
|
◆ CASESTR
#define CASESTR |
( |
|
n | ) |
case n: return #n |
◆ DEBUG_CUBIN_RELOCATION
#define DEBUG_CUBIN_RELOCATION 0 |
◆ DEBUG_INFO_SECTION_NAME
#define DEBUG_INFO_SECTION_NAME ".debug_info" |
◆ DEBUG_LINE_SECTION_NAME
#define DEBUG_LINE_SECTION_NAME ".debug_line" |
◆ R_NV_32
◆ R_NV_64
◆ section_index
#define section_index |
( |
|
n | ) |
(n-1) |
◆ Elf_SectionVector
◆ Elf_SymbolVector
◆ applyDebugInfoRelocations()
static void applyDebugInfoRelocations |
( |
Elf_SymbolVector * |
symbol_values, |
|
|
char * |
debug_info, |
|
|
int |
n_relocations, |
|
|
Elf_Data * |
relocations_data |
|
) |
| |
|
static |
◆ applyLineMapRelocations()
static void applyLineMapRelocations |
( |
Elf_SymbolVector * |
symbol_values, |
|
|
char * |
line_map, |
|
|
int |
n_relocations, |
|
|
Elf_Data * |
relocations_data |
|
) |
| |
|
static |
◆ applyRELArelocation()
static void applyRELArelocation |
( |
char * |
debug_info, |
|
|
Elf_SymbolVector * |
symbol_values, |
|
|
GElf_Rela * |
rela |
|
) |
| |
|
static |
◆ applyRelocation()
static void applyRelocation |
( |
void * |
addr, |
|
|
unsigned |
rel_type, |
|
|
uint64_t |
rel_value |
|
) |
| |
|
static |
◆ applyRELrelocation()
static void applyRELrelocation |
( |
char * |
line_map, |
|
|
Elf_SymbolVector * |
symbol_values, |
|
|
GElf_Rel * |
rel |
|
) |
| |
|
static |
◆ relocateCubin()
bool relocateCubin |
( |
char * |
cubin_ptr, |
|
|
Elf * |
cubin_elf |
|
) |
| |
◆ relocateDebugInfo()
◆ relocateLineMap()
◆ relocateProgramDataSegments()
◆ relocateSymbols()
◆ relocateSymbolsHelper()
◆ sectionOffset()