The interface arch_elf_init now takes library as one argument
diff --git a/common.h b/common.h
index b57a4c1..98234fd 100644
--- a/common.h
+++ b/common.h
@@ -220,7 +220,7 @@
int os_ltrace_exiting_sighandler(void);
void os_ltrace_exiting(void);
-int arch_elf_init(struct ltelf *lte);
+int arch_elf_init(struct ltelf *lte, struct library *lib);
void arch_elf_destroy(struct ltelf *lte);
enum plt_status {
diff --git a/ltrace-elf.c b/ltrace-elf.c
index ca08c13..bae9853 100644
--- a/ltrace-elf.c
+++ b/ltrace-elf.c
@@ -24,7 +24,7 @@
#ifndef ARCH_HAVE_LTELF_DATA
int
-arch_elf_init(struct ltelf *lte)
+arch_elf_init(struct ltelf *lte, struct library *lib)
{
return 0;
}
@@ -423,11 +423,6 @@
if (soname_offset != 0)
lte->soname = lte->dynstr + soname_offset;
- if (arch_elf_init(lte) < 0) {
- fprintf(stderr, "Backend initialization failed.\n");
- return -1;
- }
-
return 0;
}
@@ -650,6 +645,11 @@
struct ltelf lte = {};
if (do_init_elf(<e, filename, bias) < 0)
return -1;
+ if (arch_elf_init(<e, lib) < 0) {
+ fprintf(stderr, "Backend initialization failed.\n");
+ return -1;
+ }
+
proc->e_machine = lte.ehdr.e_machine;
int status = 0;