This is the mail archive of the
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
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
2013-11-01 Jan Kratochvil <email@example.com>
Handle missing CFI in .plt
(selfdump_callback): Update frame #0 for function raise.
(prepare_thread): Do not single-step into .plt.
@@ -297,8 +297,10 @@ selfdump_callback (pid_t tid, unsigned frameno, Dwarf_Addr pc,
- /* .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);
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.
errno = 0;