aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohamad Ayyash <mkayyash@google.com>2014-04-08 00:39:49 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-04-08 00:39:49 +0000
commit855b8a20be0cff41dbfbb245b91fe417acf194cf (patch)
tree48f747120ad7c92d3d4a67e336f399a631054c90
parent1031614c095f00454326deb460a83381e98d5166 (diff)
parent27e80c93b4eadfc54c2bd2196028ed7ac1cc13f6 (diff)
downloadltrace-855b8a20be0cff41dbfbb245b91fe417acf194cf.tar.gz
Merge "ltrace: Fix the mips build."
-rw-r--r--output.c2
-rw-r--r--sysdeps/linux-gnu/mips/plt.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/output.c b/output.c
index 0cec653..c4674d1 100644
--- a/output.c
+++ b/output.c
@@ -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;
}