This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH] readelf.c: wrong branch prediction
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 16 May 2011 04:00:44 -0400
- Subject: Re: [PATCH] readelf.c: wrong branch prediction
> I've been playing with the debugpred
How interesting, I didn't know about --enable-debugpred.
That does look super useful. It is implemented through
lib/eu-config.h and src/debugpred.h. An explanation of
how it works can be found in the appendix to
"What Every Programmer Should Know About Memory"
http://www.akkadia.org/drepper/cpumemory.pdf
A.2 Debug Branch Prediction
(lwn.net has a text version online where the appendix
is section 9.2 https://lwn.net/Articles/258188/)
> and noticed, that every time when
> running the eu-readelf -r, e.g., src/readelf -r src/readelf, we get:
>
> readelf.c:1845: wrong=148, correct=0 <==== WARNING
Like Ulrich said, you probably ran the binary in such a way that
libebl isn't loading the correct backend (in such a case
ebl_reloc_type_check will just always return false). Make sure you
double check your LD_LIBRARY_PATH and the output of eu-readelf -r,
if it only contains <INVALID_RELOC> you know something is wrong.
Cheers,
Mark