summaryrefslogtreecommitdiff
path: root/plugins/elf/symbols.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-02-16 17:58:35 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-02-16 17:58:35 (GMT)
commitd5e94fd2895a5f9c4903bdaddf75727a54aec181 (patch)
treed2f11a1862e6df3d86c4f65aeb98e6fc04e7cf3b /plugins/elf/symbols.c
parentd93d67a2408fd5c09e73b40fdbd28d4914254a90 (diff)
Extended the ELF format support.
Diffstat (limited to 'plugins/elf/symbols.c')
-rw-r--r--plugins/elf/symbols.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/plugins/elf/symbols.c b/plugins/elf/symbols.c
index de4d21a..315d003 100644
--- a/plugins/elf/symbols.c
+++ b/plugins/elf/symbols.c
@@ -262,7 +262,7 @@ static bool load_all_elf_basic_entry_points(GElfFormat *format)
/* Détection des constructeurs & destructeurs */
- if (find_elf_dynamic_item_from_pheader(format, &dynamic, DT_INIT, &item_a))
+ if (_find_elf_dynamic_item_by_type(format, &dynamic, DT_INIT, &item_a))
{
ep = ELF_DYN(format, item_a, d_un.d_ptr);
@@ -274,7 +274,7 @@ static bool load_all_elf_basic_entry_points(GElfFormat *format)
}
- if (find_elf_dynamic_item_from_pheader(format, &dynamic, DT_FINI, &item_a))
+ if (_find_elf_dynamic_item_by_type(format, &dynamic, DT_FINI, &item_a))
{
ep = ELF_DYN(format, item_a, d_un.d_ptr);
@@ -340,27 +340,27 @@ static bool load_all_elf_basic_entry_points(GElfFormat *format)
}
- if (find_elf_dynamic_item_from_pheader(format, &dynamic, DT_INIT_ARRAY, &item_a))
+ if (_find_elf_dynamic_item_by_type(format, &dynamic, DT_INIT_ARRAY, &item_a))
{
- if (find_elf_dynamic_item_from_pheader(format, &dynamic, DT_INIT_ARRAYSZ, &item_b))
+ if (_find_elf_dynamic_item_by_type(format, &dynamic, DT_INIT_ARRAYSZ, &item_b))
{
load_entry_points_from_array(format, &item_a, &item_b, "init_array_function_");
}
}
- if (find_elf_dynamic_item_from_pheader(format, &dynamic, DT_FINI_ARRAY, &item_a))
+ if (_find_elf_dynamic_item_by_type(format, &dynamic, DT_FINI_ARRAY, &item_a))
{
- if (find_elf_dynamic_item_from_pheader(format, &dynamic, DT_FINI_ARRAYSZ, &item_b))
+ if (_find_elf_dynamic_item_by_type(format, &dynamic, DT_FINI_ARRAYSZ, &item_b))
{
load_entry_points_from_array(format, &item_a, &item_b, "fini_array_function_");
}
}
- if (find_elf_dynamic_item_from_pheader(format, &dynamic, DT_PREINIT_ARRAY, &item_a))
+ if (_find_elf_dynamic_item_by_type(format, &dynamic, DT_PREINIT_ARRAY, &item_a))
{
- if (find_elf_dynamic_item_from_pheader(format, &dynamic, DT_PREINIT_ARRAYSZ, &item_b))
+ if (_find_elf_dynamic_item_by_type(format, &dynamic, DT_PREINIT_ARRAYSZ, &item_b))
{
load_entry_points_from_array(format, &item_a, &item_b, "preinit_array_function_");
}
@@ -369,7 +369,7 @@ static bool load_all_elf_basic_entry_points(GElfFormat *format)
/* Identification de l'entrée de la PLT */
- if (find_elf_dynamic_item_from_pheader(format, &dynamic, DT_PLTGOT, &item_a))
+ if (_find_elf_dynamic_item_by_type(format, &dynamic, DT_PLTGOT, &item_a))
{
status = g_exe_format_translate_address_into_vmpa(G_EXE_FORMAT(format),
ELF_DYN(format, item_a, d_un.d_val),
@@ -775,7 +775,7 @@ static bool count_elf_global_symbols(GElfFormat *format, GExeFormat *exec, uint3
*
*/
- found = find_elf_dynamic_item(format, DT_HASH, &hash);
+ found = find_elf_dynamic_item_by_type(format, DT_HASH, &hash);
if (!found) goto cegs_exit;
exec = G_EXE_FORMAT(format);
@@ -833,7 +833,7 @@ static bool load_elf_global_symbols(GElfFormat *format, wgroup_id_t gid, GtkStat
/* Récupération du début des chaînes de description */
- result = find_elf_dynamic_item(format, DT_STRTAB, &strtab);
+ result = find_elf_dynamic_item_by_type(format, DT_STRTAB, &strtab);
if (!result) goto lees_exit;
result = g_exe_format_translate_address_into_offset(exec, ELF_DYN(format, strtab, d_un.d_ptr), &str_start);
@@ -841,7 +841,7 @@ static bool load_elf_global_symbols(GElfFormat *format, wgroup_id_t gid, GtkStat
/* Récupération du début des définitions de symboles */
- result = find_elf_dynamic_item(format, DT_SYMTAB, &symtab);
+ result = find_elf_dynamic_item_by_type(format, DT_SYMTAB, &symtab);
if (!result) goto lees_exit;
result = g_exe_format_translate_address_into_offset(exec, ELF_DYN(format, symtab, d_un.d_ptr), &sym_start);
@@ -954,7 +954,7 @@ static bool load_elf_relocations(GElfFormat *format, const elf_phdr *dynamic, el
/* Collecte des informations */
- if (!find_elf_dynamic_item_from_pheader(format, dynamic, DT_JMPREL, &jmprel))
+ if (!_find_elf_dynamic_item_by_type(format, dynamic, DT_JMPREL, &jmprel))
goto ler_exit;
result = g_exe_format_translate_address_into_vmpa(exec, ELF_DYN(format, jmprel, d_un.d_ptr), &start);
@@ -962,7 +962,7 @@ static bool load_elf_relocations(GElfFormat *format, const elf_phdr *dynamic, el
if (!result)
goto ler_exit;
- if (!find_elf_dynamic_item_from_pheader(format, dynamic, DT_PLTRELSZ, &pltrelsz))
+ if (!_find_elf_dynamic_item_by_type(format, dynamic, DT_PLTRELSZ, &pltrelsz))
goto ler_exit;
length = ELF_DYN(format, pltrelsz, d_un.d_val);
@@ -1270,7 +1270,7 @@ static bool apply_elf_relocations(GElfFormat *format, elf_rel *relocs, size_t re
/* Récupération du début des chaînes de description */
- result = find_elf_dynamic_item(format, DT_STRTAB, &strtab);
+ result = find_elf_dynamic_item_by_type(format, DT_STRTAB, &strtab);
if (!result) goto aer_exit;
result = g_exe_format_translate_address_into_offset(exec, ELF_DYN(format, strtab, d_un.d_ptr), &str_start);
@@ -1278,7 +1278,7 @@ static bool apply_elf_relocations(GElfFormat *format, elf_rel *relocs, size_t re
/* Récupération du début des définitions de symboles */
- result = find_elf_dynamic_item(format, DT_SYMTAB, &symtab);
+ result = find_elf_dynamic_item_by_type(format, DT_SYMTAB, &symtab);
if (!result) goto aer_exit;
result = g_exe_format_translate_address_into_offset(exec, ELF_DYN(format, symtab, d_un.d_ptr), &sym_start);