X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/4a9eb8522e1c718af5e77352801855a6020cd604..1fac669cf3cf9733cc5d4c03a9568c150761fc1e:/disabled-packages/ltrace/ltrace-elf.c.patch diff --git a/disabled-packages/ltrace/ltrace-elf.c.patch b/disabled-packages/ltrace/ltrace-elf.c.patch index eaa18125..7e5f8249 100644 --- a/disabled-packages/ltrace/ltrace-elf.c.patch +++ b/disabled-packages/ltrace/ltrace-elf.c.patch @@ -1,6 +1,8 @@ ---- ltrace-2def9f1217374cc8371105993003b2c663aefda7/ltrace-elf.c 2016-04-11 21:30:04.000000000 +0200 -+++ src/ltrace-elf.c 2016-05-07 21:23:17.999754862 +0200 -@@ -423,7 +423,9 @@ +diff --git a/ltrace-elf.c b/ltrace-elf.c +index f439cb0..60f1941 100644 +--- a/ltrace-elf.c ++++ b/ltrace-elf.c +@@ -423,7 +423,9 @@ ltelf_destroy(struct ltelf *lte) debug(DEBUG_FUNCTION, "close_elf()"); elf_end(lte->elf); close(lte->fd); @@ -11,3 +13,18 @@ } static void +@@ -1149,9 +1151,11 @@ read_module(struct library *lib, struct process *proc, + * determine whether ABI is supported. This is to get + * reasonable error messages when trying to run 64-bit binary + * with 32-bit ltrace. It is desirable to preserve this. */ +- proc->e_machine = lte.ehdr.e_machine; +- proc->e_class = lte.ehdr.e_ident[EI_CLASS]; +- get_arch_dep(proc); ++ if (proc->e_machine == 0) { ++ proc->e_machine = lte.ehdr.e_machine; ++ proc->e_class = lte.ehdr.e_ident[EI_CLASS]; ++ get_arch_dep(proc); ++ } + + /* Find out the base address. For PIE main binaries we look + * into auxv, otherwise we scan phdrs. */