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.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/plugins/elf/symbols.c b/plugins/elf/symbols.c
index 01b7a17..1cc0280 100644
--- a/plugins/elf/symbols.c
+++ b/plugins/elf/symbols.c
@@ -97,13 +97,13 @@ static bool load_elf_global_symbols(GElfFormat *, wgroup_id_t, GtkStatusStack *)
static bool do_elf_relocation_loading(GElfLoading *, GElfFormat *, phys_t *);
/* Charge en mémoire toutes les relocalisations présentes. */
-static bool load_elf_relocations(GElfFormat *, const elf_phdr *, elf_rel **, size_t *, GtkStatusStack *);
+static bool load_elf_relocations(GElfFormat *, const elf_phdr *, elf_rel **, size_t *, wgroup_id_t, GtkStatusStack *);
/* Assure l'intégration d'un symbole issu des relocalisations. */
static bool do_elf_relocation_renaming(GElfLoading *, GElfFormat *, GBinSymbol *);
/* Applique les étiquettes issues des relocalisations. */
-static bool apply_elf_relocations(GElfFormat *, elf_rel *, size_t, sym_iter_t *, GtkStatusStack *);
+static bool apply_elf_relocations(GElfFormat *, elf_rel *, size_t, sym_iter_t *, wgroup_id_t, GtkStatusStack *);
@@ -115,6 +115,7 @@ static bool apply_elf_relocations(GElfFormat *, elf_rel *, size_t, sym_iter_t *,
/******************************************************************************
* *
* Paramètres : format = description de l'exécutable à compléter. *
+* gid = groupe de travail impliqué. *
status = barre de statut à tenir informée. *
* *
* Description : Charge en mémoire la liste humaine des symboles. *
@@ -125,15 +126,12 @@ static bool apply_elf_relocations(GElfFormat *, elf_rel *, size_t, sym_iter_t *,
* *
******************************************************************************/
-bool load_elf_symbols(GElfFormat *format, GtkStatusStack *status)
+bool load_elf_symbols(GElfFormat *format, wgroup_id_t gid, GtkStatusStack *status)
{
bool result; /* Bilan à retourner */
- wgroup_id_t gid; /* Identifiant pour les tâches */
result = true;
- gid = g_work_queue_define_work_group(get_work_queue());
-
/* Symboles internes */
result &= load_elf_local_symbols(format, gid, status);
@@ -921,6 +919,7 @@ static bool do_elf_relocation_loading(GElfLoading *loading, GElfFormat *format,
* dynamic = en-tête de programme de type DYNAMIC. *
* relocs = liste des relocalisations triées à charger. [OUT] *
* count = taille de cette liste. [OUT] *
+* gid = groupe de travail dédié. *
* status = barre de statut à tenir informée. *
* *
* Description : Charge en mémoire toutes les relocalisations présentes. *
@@ -931,7 +930,7 @@ static bool do_elf_relocation_loading(GElfLoading *loading, GElfFormat *format,
* *
******************************************************************************/
-static bool load_elf_relocations(GElfFormat *format, const elf_phdr *dynamic, elf_rel **relocs, size_t *count, GtkStatusStack *status)
+static bool load_elf_relocations(GElfFormat *format, const elf_phdr *dynamic, elf_rel **relocs, size_t *count, wgroup_id_t gid, GtkStatusStack *status)
{
bool result; /* Bilan à retourner */
GExeFormat *exec; /* Autre vision du format */
@@ -945,7 +944,6 @@ static bool load_elf_relocations(GElfFormat *format, const elf_phdr *dynamic, el
bool ret; /* Bilan d'un appel */
activity_id_t msg; /* Message de progression */
GWorkQueue *queue; /* Gestionnaire de différés */
- wgroup_id_t gid; /* Identifiant pour les tâches */
guint runs_count; /* Qté d'exécutions parallèles */
phys_t run_size; /* Volume réparti par exécution*/
GElfLoading **loadings; /* Tâches de chargement */
@@ -1012,7 +1010,6 @@ static bool load_elf_relocations(GElfFormat *format, const elf_phdr *dynamic, el
msg = gtk_status_stack_add_activity(status, _("Loading relocations..."), length);
queue = get_work_queue();
- gid = g_work_queue_define_work_group(queue);
runs_count = g_get_num_processors();
@@ -1080,6 +1077,7 @@ static bool load_elf_relocations(GElfFormat *format, const elf_phdr *dynamic, el
/******************************************************************************
* *
* Paramètres : format = informations chargées à consulter. *
+* gid = groupe de travail dédié. *
* status = barre de statut à tenir informée. *
* *
* Description : Actualise la désignation des fonctions externes à reloger. *
@@ -1090,7 +1088,7 @@ static bool load_elf_relocations(GElfFormat *format, const elf_phdr *dynamic, el
* *
******************************************************************************/
-bool refresh_elf_relocations(GElfFormat *format, GtkStatusStack *status)
+bool refresh_elf_relocations(GElfFormat *format, wgroup_id_t gid, GtkStatusStack *status)
{
bool result; /* Bilan à retourner */
elf_phdr dynamic; /* En-tête de programme DYNAMIC*/
@@ -1110,7 +1108,7 @@ bool refresh_elf_relocations(GElfFormat *format, GtkStatusStack *status)
/* Chargement des relocalisations */
- if (!load_elf_relocations(format, &dynamic, &relocs, &rel_count, status))
+ if (!load_elf_relocations(format, &dynamic, &relocs, &rel_count, gid, status))
goto rer_quick_exit;
/* Localisation du code de la PLT */
@@ -1142,7 +1140,7 @@ bool refresh_elf_relocations(GElfFormat *format, GtkStatusStack *status)
if (result)
{
- result = apply_elf_relocations(format, relocs, rel_count, iter, status);
+ result = apply_elf_relocations(format, relocs, rel_count, iter, gid, status);
delete_symbol_iterator(iter);
@@ -1250,6 +1248,7 @@ static bool do_elf_relocation_renaming(GElfLoading *loading, GElfFormat *format,
* relocs = table des relocalisations chargées. *
* rel_count = nombre de ces éléments à interpréter. *
* iter = itérateur sur les symboles à parcourir. *
+* gid = groupe de travail dédié. *
* status = barre de statut à tenir informée. *
* *
* Description : Applique les étiquettes issues des relocalisations. *
@@ -1260,7 +1259,7 @@ static bool do_elf_relocation_renaming(GElfLoading *loading, GElfFormat *format,
* *
******************************************************************************/
-static bool apply_elf_relocations(GElfFormat *format, elf_rel *relocs, size_t rel_count, sym_iter_t *iter, GtkStatusStack *status)
+static bool apply_elf_relocations(GElfFormat *format, elf_rel *relocs, size_t rel_count, sym_iter_t *iter, wgroup_id_t gid, GtkStatusStack *status)
{
bool result; /* Bilan à retourner */
GExeFormat *exec; /* Autre vision du format */
@@ -1271,7 +1270,6 @@ static bool apply_elf_relocations(GElfFormat *format, elf_rel *relocs, size_t re
uint32_t sym_count; /* Nombre de symboles présents */
activity_id_t msg; /* Message de progression */
GWorkQueue *queue; /* Gestionnaire de différés */
- wgroup_id_t gid; /* Identifiant pour les tâches */
GElfLoading *loading; /* Tâche de chargement */
exec = G_EXE_FORMAT(format);
@@ -1302,7 +1300,6 @@ static bool apply_elf_relocations(GElfFormat *format, elf_rel *relocs, size_t re
msg = gtk_status_stack_add_activity(status, _("Applying relocations..."), rel_count);
queue = get_work_queue();
- gid = g_work_queue_define_work_group(queue);
loading = g_elf_loading_new_for_applying(format, iter, str_start, relocs, rel_count,
sym_start, sym_count, msg, do_elf_relocation_renaming);