History log of /bionic/libc/bionic/dl_iterate_phdr_static.cpp
Revision Date Author Comments
7dc2b7b30ddc158a5e7aa6945526eb65d354b96c 11-Sep-2014 Elliott Hughes <enh@google.com> Fix signal trampolines.

* LP32 should use sa_restorer too. gdb expects this, and future (>= 3.15) x86
kernels will apparently stop supporting the case where SA_RESTORER isn't
set.

* gdb and libunwind care about the exact instruction sequences, so we need to
modify the code slightly in a few cases to match what they're looking for.

* gdb also cares about the exact function names (for some architectures),
so we need to use __restore and __restore_rt rather than __sigreturn and
__rt_sigreturn.

* It's possible that we don't have a VDSO; dl_iterate_phdr shouldn't assume
that getauxval(AT_SYSINFO_EHDR) will return a non-null pointer.

This fixes unwinding through a signal handler in gdb for all architectures.
It doesn't fix libunwind for arm and arm64. I'll keep investigating that...

(cherry picked from commit 36f451a6d93b6807944d99fa23396e039c47e845)

Bug: 17436734
Change-Id: Ic1ea1184db6655c5d96180dc07bcc09628e647cb
36f451a6d93b6807944d99fa23396e039c47e845 11-Sep-2014 Elliott Hughes <enh@google.com> Fix signal trampolines.

* LP32 should use sa_restorer too. gdb expects this, and future (>= 3.15) x86
kernels will apparently stop supporting the case where SA_RESTORER isn't
set.

* gdb and libunwind care about the exact instruction sequences, so we need to
modify the code slightly in a few cases to match what they're looking for.

* gdb also cares about the exact function names (for some architectures),
so we need to use __restore and __restore_rt rather than __sigreturn and
__rt_sigreturn.

* It's possible that we don't have a VDSO; dl_iterate_phdr shouldn't assume
that getauxval(AT_SYSINFO_EHDR) will return a non-null pointer.

This fixes unwinding through a signal handler in gdb for all architectures.
It doesn't fix libunwind for arm and arm64. I'll keep investigating that...

Bug: 17436734
Change-Id: Ic1ea1184db6655c5d96180dc07bcc09628e647cb
3002131da33401cf1b45abbdbec58b7c751fc43a 16-Jul-2014 Elliott Hughes <enh@google.com> Use VDSO for clock_gettime(2) and gettimeofday(2).

Bug: 15387103

(cherry picked from commit 625993dfbb085a3cde7492eda8ec1cdc1ee39a78)

Change-Id: I0e156d7049ba1495902259071a96936592e74025
625993dfbb085a3cde7492eda8ec1cdc1ee39a78 16-Jul-2014 Elliott Hughes <enh@google.com> Use VDSO for clock_gettime(2) and gettimeofday(2).

Bug: 15387103
Change-Id: Ifc3608ea65060c1dc38120b10b6e79874f182a36
0266ae5f884d72da58f33a072e865ba131234a5e 11-Feb-2014 Elliott Hughes <enh@google.com> Switch <elf.h> over to linux uapi under the covers.

Remove the linker's reliance on BSD cruft and use the glibc-style
ElfW macro. (Other code too, but the linker contains the majority
of the code that needs to work for Elf32 and Elf64.)

All platforms need dl_iterate_phdr_static, so it doesn't make sense
to have that part of the per-architecture configuration.

Bug: 12476126
Change-Id: I1d7f918f1303a392794a6cd8b3512ff56bd6e487