aboutsummaryrefslogtreecommitdiff
path: root/ltrace-elf.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-04-17 05:17:48 +0200
committerPetr Machata <pmachata@redhat.com>2012-04-19 01:54:35 +0200
commite0615ab04b1bd376aae61c62d77fa6bda219f326 (patch)
tree02d1eb85689316a3827c41498fbadff03b159084 /ltrace-elf.c
parent93d95dff48698b8bde511c7f71acda7646da2626 (diff)
downloadltrace-e0615ab04b1bd376aae61c62d77fa6bda219f326.tar.gz
The interface arch_elf_init now takes library as one argument
Diffstat (limited to 'ltrace-elf.c')
-rw-r--r--ltrace-elf.c12
1 files changed, 6 insertions, 6 deletions
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 @@ extern char *PLTs_initialized_by_here;
#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 @@ do_init_elf(struct ltelf *lte, const char *filename, GElf_Addr bias)
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 @@ ltelf_read_library(struct library *lib, struct Process *proc,
struct ltelf lte = {};
if (do_init_elf(&lte, filename, bias) < 0)
return -1;
+ if (arch_elf_init(&lte, lib) < 0) {
+ fprintf(stderr, "Backend initialization failed.\n");
+ return -1;
+ }
+
proc->e_machine = lte.ehdr.e_machine;
int status = 0;