This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

dwfl_addrmodule() differences bw F20 and RHEL7


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]