about summary refs log tree commit diff
path: root/sysdeps/x86_64/link-defines.sym
diff options
context:
space:
mode:
authorIgor Zamyatin <igor.zamyatin@intel.com>2014-04-16 14:43:16 -0700
committerH.J. Lu <hjl.tools@gmail.com>2014-04-16 14:46:49 -0700
commitea8ba7cd14d0f479bae8365ae5c4ef177bdd0aad (patch)
treeaa6c46df56a9ac7567b3bcfa3db37f55ac7b3775 /sysdeps/x86_64/link-defines.sym
parent3c799e913168a84197c08e62d47be666329308e0 (diff)
downloadglibc-ea8ba7cd14d0f479bae8365ae5c4ef177bdd0aad.tar.gz
glibc-ea8ba7cd14d0f479bae8365ae5c4ef177bdd0aad.tar.xz
glibc-ea8ba7cd14d0f479bae8365ae5c4ef177bdd0aad.zip
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.
Diffstat (limited to 'sysdeps/x86_64/link-defines.sym')
-rw-r--r--sysdeps/x86_64/link-defines.sym8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/x86_64/link-defines.sym b/sysdeps/x86_64/link-defines.sym
index 85d35ad034..862fa22024 100644
--- a/sysdeps/x86_64/link-defines.sym
+++ b/sysdeps/x86_64/link-defines.sym
@@ -6,6 +6,7 @@ VECTOR_SIZE		sizeof (La_x86_64_vector)
 XMM_SIZE		sizeof (La_x86_64_xmm)
 YMM_SIZE		sizeof (La_x86_64_ymm)
 ZMM_SIZE		sizeof (La_x86_64_zmm)
+BND_SIZE		sizeof (__int128)
 
 LR_SIZE			sizeof (struct La_x86_64_regs)
 LR_RDX_OFFSET		offsetof (struct La_x86_64_regs, lr_rdx)
@@ -18,6 +19,9 @@ LR_RBP_OFFSET		offsetof (struct La_x86_64_regs, lr_rbp)
 LR_RSP_OFFSET		offsetof (struct La_x86_64_regs, lr_rsp)
 LR_XMM_OFFSET		offsetof (struct La_x86_64_regs, lr_xmm)
 LR_VECTOR_OFFSET	offsetof (struct La_x86_64_regs, lr_vector)
+#ifndef __ILP32__
+LR_BND_OFFSET		offsetof (struct La_x86_64_regs, lr_bnd)
+#endif
 
 LRV_SIZE		sizeof (struct La_x86_64_retval)
 LRV_RAX_OFFSET		offsetof (struct La_x86_64_retval, lrv_rax)
@@ -28,3 +32,7 @@ LRV_ST0_OFFSET		offsetof (struct La_x86_64_retval, lrv_st0)
 LRV_ST1_OFFSET		offsetof (struct La_x86_64_retval, lrv_st1)
 LRV_VECTOR0_OFFSET	offsetof (struct La_x86_64_retval, lrv_vector0)
 LRV_VECTOR1_OFFSET	offsetof (struct La_x86_64_retval, lrv_vector1)
+#ifndef __ILP32__
+LRV_BND0_OFFSET		offsetof (struct La_x86_64_retval, lrv_bnd0)
+LRV_BND1_OFFSET		offsetof (struct La_x86_64_retval, lrv_bnd1)
+#endif