diff options
author | Mohamad Ayyash <mkayyash@google.com> | 2014-04-07 17:27:50 -0700 |
---|---|---|
committer | Mohamad Ayyash <mkayyash@google.com> | 2014-04-07 17:33:41 -0700 |
commit | 27e80c93b4eadfc54c2bd2196028ed7ac1cc13f6 (patch) | |
tree | b01c99489514bcd0c853261a949c983a6ec37c2d | |
parent | 6bacfc7b34be8414d01c201f1c6086e3edaa8b62 (diff) | |
download | ltrace-27e80c93b4eadfc54c2bd2196028ed7ac1cc13f6.tar.gz |
ltrace: Fix the mips build.
1) Fix missing error.h in plt.c.
2) Add a TODO to fix missing relplt_count in mips plt.c.
3) Enforce operator precedence between * and != which is apparently incorrect for the mips compiler.
Change-Id: I2d5d925566daf81a0380724bc103570c80e381e7
-rw-r--r-- | output.c | 2 | ||||
-rw-r--r-- | sysdeps/linux-gnu/mips/plt.c | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -725,7 +725,7 @@ output_right(enum tof type, struct process *proc, struct library_symbol *libsym, /* Verify that we can safely cast arch_addr_t* to * unw_word_t*. */ - (void)sizeof(char[1 - 2*(sizeof(unw_word_t) + (void)sizeof(char[1 - (2*(sizeof(unw_word_t)) != sizeof(arch_addr_t))]); unw_init_remote(&cursor, proc->unwind_as, proc->unwind_priv); while (unwind_depth) { diff --git a/sysdeps/linux-gnu/mips/plt.c b/sysdeps/linux-gnu/mips/plt.c index 3adf2ec..f0098ac 100644 --- a/sysdeps/linux-gnu/mips/plt.c +++ b/sysdeps/linux-gnu/mips/plt.c @@ -22,7 +22,6 @@ */ #include <string.h> -#include <error.h> #include <errno.h> #include <gelf.h> #include <sys/ptrace.h> @@ -210,7 +209,7 @@ arch_elf_init(struct ltelf *lte, struct library *lib) if (elf_get_section_type(lte, SHT_DYNAMIC, &scn, &shdr) < 0 || scn == NULL) { fail: - error(0, 0, "Couldn't get SHT_DYNAMIC: %s", + fprintf(stderr, "Couldn't get SHT_DYNAMIC: %s", elf_errmsg(-1)); return -1; } @@ -238,7 +237,10 @@ arch_elf_init(struct ltelf *lte, struct library *lib) /* Tell the generic code how many dynamic trace:able symbols * we've got. */ - lte->relplt_count = lte->dynsym_count - lte->arch.mips_gotsym; + /* BEGIN android-changed */ + /* TODO(mkayyash): Investigate a fix for missing relplt_count. */ + /* lte->relplt_count = lte->dynsym_count - lte->arch.mips_gotsym; */ + /* END android-changed */ return 0; } |