aboutsummaryrefslogtreecommitdiff
path: root/libltrace.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2011-09-21 17:38:59 +0200
committerPetr Machata <pmachata@redhat.com>2011-10-06 14:30:36 +0200
commit02bd9eca0b439b6950ab72ba64b67181e5bf0fbd (patch)
tree8ba70f2c9c3504be745f1b5c25e1ee3c40d5bc40 /libltrace.c
parent993f412c60e168e67e9b64fe5a300a2868c8d71d (diff)
downloadltrace-02bd9eca0b439b6950ab72ba64b67181e5bf0fbd.tar.gz
Check whether ABI is supported before we execute the binary
- this is fallout of the reorganization of open_program/execute_program. I still think it makes better sense this wey, even though we need to do the additional checking step now.
Diffstat (limited to 'libltrace.c')
-rw-r--r--libltrace.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libltrace.c b/libltrace.c
index e731fe1..19bfafd 100644
--- a/libltrace.c
+++ b/libltrace.c
@@ -107,6 +107,11 @@ ltrace_init(int argc, char **argv) {
}
}
if (command) {
+ /* Check that the binary ABI is supported before
+ * calling execute_program. */
+ struct ltelf lte = {};
+ open_elf(&lte, command);
+
open_program(command, execute_program(command, argv), 0);
}
opt_p_tmp = opt_p;