Save/restore bound registers for _dl_runtime_profile
authorIgor Zamyatin <igor.zamyatin@intel.com>
Wed, 16 Apr 2014 21:43:16 +0000 (14:43 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 16 Apr 2014 21:46:49 +0000 (14:46 -0700)
commitea8ba7cd14d0f479bae8365ae5c4ef177bdd0aad
treeaa6c46df56a9ac7567b3bcfa3db37f55ac7b3775
parent3c799e913168a84197c08e62d47be666329308e0
Save/restore bound registers for _dl_runtime_profile

This patch saves and restores bound registers in x86-64 PLT for
ld.so profile and LD_AUDIT:

* sysdeps/x86_64/bits/link.h (La_x86_64_regs): Add lr_bnd.
(La_x86_64_retval): Add lrv_bnd0 and lrv_bnd1.
* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Save
Intel MPX bound registers before _dl_profile_fixup.
* sysdeps/x86_64/dl-trampoline.h: Restore Intel MPX bound
registers after _dl_profile_fixup.  Save and restore bound
registers bnd0/bnd1 when calling _dl_call_pltexit.
* sysdeps/x86_64/link-defines.sym (BND_SIZE): New.
(LR_BND_OFFSET): Likewise.
(LRV_BND0_OFFSET): Likewise.
(LRV_BND1_OFFSET): Likewise.
ChangeLog
sysdeps/x86/bits/link.h
sysdeps/x86_64/dl-trampoline.S
sysdeps/x86_64/dl-trampoline.h
sysdeps/x86_64/link-defines.sym