<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 27, 2012 at 4:07 PM, Petr Machata <span dir="ltr"><<a href="mailto:pmachata@redhat.com" target="_blank">pmachata@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Randy MacLeod <<a href="mailto:rwmacleod@gmail.com">rwmacleod@gmail.com</a>> writes:<br>
...</div>
<div class="im"><br>
> I also built for mips-32 and found that it compiles but doesn't run. See below. <br>
> This result contradicts the README so if other people confirm that mips is busted,<br>
> then the README should be changed.<br>
<br>
</div>Could you please try plain 0.7.0 as well? This should be about the<br>
same, but chances are I broke something on master since 0.7.0. Sedat<br>
Dilek and Edgar Iglesias both reported that 0.7.0 worked on 32-bit MIPS.<br>
I think they meant 32-bit MIPS CPU, not even MIPS64 running in 32-bit<br>
mode (n32 ABI).<br></blockquote><div><br></div><div>I tried that. It didn't work either.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> HEAD = commit 4fb13f6aa2eb371a724e2e02e744cf993ddea8f2<br>
><br>
> mips64-wrs-linux-libtool: compile: mips64-wrswrap-linux-gnu-gcc -meb -mabi=64 -mhard-float --sysroot=/home/rmacleod/wrs/5.0/b/ltrace-mips64/bitbake_build/tmp/sysroots/<br>
> qemumips-64 -DHAVE_CONFIG_H -I. -I../../..<br>
> -I../../../sysdeps/linux-gnu/mips -I../../../sysdeps/linux-gnu -I../../../sysdeps -I../../.. -Wall -Wsign-compare -Wfloat-equal -Wformat-security -Werror -O2 -pipe -g<br>
> -fno-omit-frame-pointer -fvisibility=default<br>
> -c plt.c -fPIC -DPIC -o .libs/plt.o<br>
> | plt.c: In function 'arch_elf_add_plt_entry':<br>
> | plt.c:360:4: error: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'GElf_Addr' [-Werror=format]<br>
> | plt.c:369:3: error: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'GElf_Addr' [-Werror=format]<br>
> | cc1: all warnings being treated as errors<br>
> | make[4]: *** [plt.lo] Error 1<br>
><br>
> I added a (long long unsigned int) for both cases as a quick fix to<br>
> see what else was broken.<br>
<br>
</div>I think this should be fixed like this (not tested though):<br>
<br>
diff --git a/sysdeps/linux-gnu/mipsel/plt.c b/sysdeps/linux-gnu/mipsel/plt.c<br>
index b277fbc..9dd003f 100644<br>
--- a/sysdeps/linux-gnu/mipsel/plt.c<br>
+++ b/sysdeps/linux-gnu/mipsel/plt.c<br>
@@ -26,6 +26,7 @@<br>
#include <errno.h><br>
#include <gelf.h><br>
#include <sys/ptrace.h><br>
+#include <inttypes.h><br>
<br>
#include "common.h"<br>
#include "debug.h"<br>
@@ -356,8 +357,8 @@ arch_elf_add_plt_entry(struct Process *proc, struct ltelf *lte,<br>
<br>
name = strdup(a_name);<br>
if (name == NULL) {<br>
- fprintf(stderr, "%s: failed %s(%#llx): %s\n", __func__,<br>
- name, addr, strerror(errno));<br>
+ fprintf(stderr, "%s: failed %s(%#"PRIx64"): %s\n",<br>
+ __func__, name, addr, strerror(errno));<br>
goto fail;<br>
}<br>
<br>
@@ -366,7 +367,8 @@ arch_elf_add_plt_entry(struct Process *proc, struct ltelf *lte,<br>
if (library_symbol_init(libsym,<br>
(arch_addr_t) (uintptr_t) addr,<br>
name, 1, LS_TOPLT_EXEC) < 0) {<br>
- fprintf(stderr, "%s: failed %s : %llx\n", __func__, name, addr);<br>
+ fprintf(stderr, "%s: failed %s : %"PRIx64"\n",<br>
+ __func__, name, addr);<br>
goto fail;<br>
}<br>
<br>
<br>
If you can verify that this fixes MIPS64 builds and doesn't break MIPS32<br>
builds, I'll put this in. </blockquote><div><br></div><div>I didn't get to this today. We'll see about tomorrow.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The rest is more difficult though.<br></blockquote><div><br></div><div>Agreed. :) </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">...</div><div class="im">
> root@qemu0:~# ltrace echo a<br>
> --- SIGSEGV (Segmentation fault) ---<br>
> +++ killed by SIGSEGV +++<br>
<br>
</div>Right, ltrace kills the process. This usually means a misplaced<br>
breakpoint, a mangled instruction or some such.<br>
<br>
Unfortunately I can't even tell you how much work fixing MIPS64 would<br>
be. I never played with MIPS, dunno what all is missing. Chances are<br>
Edgar will have some insight here.</blockquote><div><br></div><div><br></div></div>-- <br>../Randy/..<br>
</div>