summaryrefslogtreecommitdiff
path: root/plugins/elf/symbols.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/elf/symbols.c')
-rw-r--r--plugins/elf/symbols.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/plugins/elf/symbols.c b/plugins/elf/symbols.c
index 4854d7b..dbf3305 100644
--- a/plugins/elf/symbols.c
+++ b/plugins/elf/symbols.c
@@ -42,7 +42,6 @@
#include "dynamic.h"
#include "elf-int.h"
-#include "helper_arm.h"
#include "loading.h"
#include "program.h"
#include "section.h"
@@ -189,10 +188,7 @@ static void register_elf_entry_point(GElfFormat *format, virt_t vaddr, phys_t le
/* Localisation complète du symbole */
- if (ELF_HDR(format, format->header, e_machine) == EM_ARM)
- final_vaddr = vaddr & ~0x1;
- else
- final_vaddr = vaddr;
+ final_vaddr = format->ops.fix_virt(vaddr);
status = g_exe_format_translate_address_into_vmpa(G_EXE_FORMAT(format), final_vaddr, &addr);
if (!status) return;
@@ -514,8 +510,7 @@ static bool do_elf_symbol_loading(GElfLoading *loading, GElfFormat *format, bool
/* Ajustement de la position */
- if (ELF_HDR(format, format->header, e_machine) == EM_ARM)
- virt &= ~0x1;
+ virt = format->ops.fix_virt(virt);
/* Constitution d'une routine */
@@ -1205,11 +1200,7 @@ static bool do_elf_relocation_renaming(GElfLoading *loading, GElfFormat *format,
/* Détermination de la relocalisation associée */
- if (ELF_HDR(format, format->header, e_machine) == EM_ARM)
- result = retrieve_arm_linkage_offset(format, range, &offset);
- else
- result = false;
-
+ result = format->ops.get_linkage_offset(format, range, &offset);
if (!result) goto derr_exit;
result = g_elf_loading_search_for_relocation(loading, &offset, &reloc);