From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: elfutils-devel@lists.fedorahosted.org
Subject: dwfl_addrmodule() differences bw F20 and RHEL7
Date: Fri, 24 Oct 2014 18:33:45 -0700 [thread overview]
Message-ID: <20141025013345.GB26351@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2548 bytes --]
We have some code in the perf tool[1] that uses following
sequence of calls to try and determine if the return address
for a function is in the link register (LR) or on the stack:
dwfl = dwfl_begin(&offline_callbacks);
dwfl_report_offline(dwfl, "" exec_file, -1);
mod = dwfl_addrmodule(dwfl, pc);
dwfl_module_eh_cfi(mod, &bias);
/* etc.. */
where: exec_file is
/usr/lib64/power8/libc-2.17.so (on RHEL7)
/usr/lib64/libc-2.18.so (on Fedora20)
and 'pc' is an address in libc, say in vfprintf(), rand() etc.
This sequence of calls works consistently on Fedora20 and fails
consistently on RHEL7 - where dwfl_addrmodule() returns -1
(dwfl_errmsg() says "no error").
The versions of elfutils, glibc, gcc are slightly different
between the two and I have listed them below [2][3][4].
Is there a difference in the way libc or debug info is
organized between F20 and RHEL7 ?
The Fedora20 is a Power7 system and RHEL7 is a Power8.
With some debug statements, I see that in dwfl_addrsegment():
lookup() retruns 1,
dwfl->lookup_module is non-null
dwfl_addrsegment() returns -1.
I can collect more debug if necessary.
Appreciate any help in understanding what is going on.
Sukadev
[1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/tools/perf/arch/powerpc/util/skip-callchain-idx.c
[2] elfutils RPMS that I have on my systems:
Fedora20:
elfutils-libelf-devel-0.158-1.fc20.ppc64
elfutils-0.158-1.fc20.ppc64
elfutils-libs-0.158-1.fc20.ppc64
elfutils-libelf-0.158-1.fc20.ppc64
elfutils-devel-0.158-1.fc20.ppc64
RHEL7:
elfutils-0.158-3.el7.ppc64
elfutils-libelf-0.158-3.el7.ppc64
elfutils-libs-0.158-3.el7.ppc64
elfutils-libelf-devel-0.158-3.el7.ppc64
elfutils-devel-0.158-3.el7.ppc64
[3] glibc RPMS on my systems:
Fedora20:
glibc-common-2.18-11.fc20.ppc64p7
glibc-2.18-11.fc20.ppc64p7
glibc-headers-2.18-11.fc20.ppc64p7
glibc-debuginfo-common-2.18-11.fc20.ppc64p7
glibc-devel-2.18-11.fc20.ppc64p7
glibc-debuginfo-2.18-11.fc20.ppc64p7
RHEL7:
glibc-common-2.17-55.el7.ppc64
glibc-headers-2.17-55.el7.ppc64
glibc-debuginfo-2.17-55.el7.ppc64
glibc-2.17-55.el7.ppc64
glibc-devel-2.17-55.el7.ppc64
glibc-debuginfo-common-2.17-55.el7.ppc64
[4] gcc RPMS
Fedora20:
libgcc-4.8.2-7.fc20.ppc64
gcc-4.8.2-7.fc20.ppc64
gcc-c++-4.8.2-7.fc20.ppc64
RHEL7:
gcc-4.8.2-16.el7.ppc64
gcc-c++-4.8.2-16.el7.ppc64
libgcc-4.8.2-16.el7.ppc64
gcc-gfortran-4.8.2-16.el7.ppc64
next reply other threads:[~2014-10-25 1:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-25 1:33 Sukadev Bhattiprolu [this message]
2014-10-30 9:25 Mark Wielaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141025013345.GB26351@us.ibm.com \
--to=sukadev@linux.vnet.ibm.com \
--cc=elfutils-devel@lists.fedorahosted.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).