This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[unwinder-portable] [patch 2/3] tests/ Handle missing CFI in .plt
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Fri, 01 Nov 2013 17:05:41 +0100
- Subject: [unwinder-portable] [patch 2/3] tests/ Handle missing CFI in .plt
Hi Mark,
this patch is for the branch 'portable' to be checked in wotj
'jankratochvil/unwindx86', that is for RHEL-5 systems.
It has been verified it is not needed on RHEL-6.
Jakub Jelinek fixed GNU ld (gold is also fixed now) to provide CFI also for
.plt. But RHEL-5 still does not have it present.
The testsuite was explicitly testing unwinding for .plt. Disable it.
I guess these three patches can be checked into the 'portable' branch
together.
Thanks,
Jan
tests/
2013-11-01 Jan Kratochvil <jan.kratochvil@redhat.com>
Handle missing CFI in .plt
(selfdump_callback): Update frame #0 for function raise.
(prepare_thread): Do not single-step into .plt.
--- a/tests/backtrace.c
+++ b/tests/backtrace.c
@@ -297,8 +297,10 @@ selfdump_callback (pid_t tid, unsigned frameno, Dwarf_Addr pc,
switch (frameno)
{
case 0:
- /* .plt has no symbols. */
- assert (symname == NULL);
+ // RHEL-5 has no .plt CFI.
+ assert (symname != NULL && strcmp (symname, "raise") == 0);
+ // /* .plt has no symbols. */
+ // assert (symname == NULL);
break;
case 1:
assert (symname != NULL && strcmp (symname, "sigusr2") == 0);
@@ -346,6 +348,7 @@ prepare_thread (pid_t pid2, Dwarf_Addr plt_start, Dwarf_Addr plt_end,
assert (got == pid2);
assert (WIFSTOPPED (status));
assert (WSTOPSIG (status) == SIGUSR1);
+ return; // RHEL-5 has no .plt CFI.
for (;;)
{
errno = 0;