I applied both patches. I get the following output:<div>./ltrace: Multiple data chunks in .hash from "/system/bin/ping"</div><div>Sorry for the wrong output earlier. I copied the changes in the wrong place by mistake.</div>
<div><br><br><div class="gmail_quote">On Tue, May 17, 2011 at 4:04 PM, <span dir="ltr"><<a href="mailto:pmachata@redhat.com">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">DUSHYANT ARORA <<a href="mailto:dushyantarora13@gmail.com">dushyantarora13@gmail.com</a>> writes:<br>
<br>
</div>> I get the same error as before.ż.<br>
<div class="im">> ./ltrace: Couldn't get .hash data from "/system/bin/ping"<br>
<br>
</div>You mean with the patch? That means it's failing to get the data in the<br>
first place, i.e. that elf_getdata fails. The patch that I'm attaching<br>
now adds more detail to that error message. It should be applied on top<br>
of that previous patch. It _might_ help in diagnosing the problem, but,<br>
honestly, "something's broken" is about the closest that we are likely<br>
to get with this.<br>
<br>
Thanks,<br>
PM<br>
<br>diff --git a/ltrace-elf.c b/ltrace-elf.c<br>
index 7676f4b..a2fa090 100644<br>
--- a/ltrace-elf.c<br>
+++ b/ltrace-elf.c<br>
@@ -317,8 +317,8 @@ do_init_elf(struct ltelf *lte, const char *filename) {<br>
data = elf_getdata(scn, NULL);<br>
if (data == NULL)<br>
error(EXIT_FAILURE, 0,<br>
- "Couldn't get .hash data from \"%s\"",<br>
- filename);<br>
+ "Couldn't get .hash data from \"%s\": %s",<br>
+ filename, elf_errmsg(-1));<br>
<br>
if (elf_getdata(scn, data) != NULL<br>
|| data->d_off || data->d_size != shdr.sh_size)<br>
<br></blockquote></div><br></div>