summaryrefslogtreecommitdiff
path: root/elf/dl-runtime.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-07-29 08:33:03 -0700
committerUlrich Drepper <drepper@redhat.com>2009-07-29 08:33:03 -0700
commitb48a267b8fbb885191a04cffdb4050a4d4c8a20b (patch)
tree1a517e3273ee5785b44a9bd5b9aec9ae62b95ac3 /elf/dl-runtime.c
parent9655389317c92e5935c47d90c0ba48ca54bd245e (diff)
Preserve SSE registers in runtime relocations on x86-64.
SSE registers are used for passing parameters and must be preserved in runtime relocations. This is inside ld.so enforced through the tests in tst-xmmymm.sh. But the malloc routines used after startup come from libc.so and can be arbitrarily complex. It's overkill to save the SSE registers all the time because of that. These calls are rare. Instead we save them on demand. The new infrastructure put in place in this patch makes this possible and efficient.
Diffstat (limited to 'elf/dl-runtime.c')
-rw-r--r--elf/dl-runtime.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
index 0eb7d4e3b9..a52120d121 100644
--- a/elf/dl-runtime.c
+++ b/elf/dl-runtime.c
@@ -111,6 +111,10 @@ _dl_fixup (
flags |= DL_LOOKUP_GSCOPE_LOCK;
}
+#ifdef RTLD_ENABLE_FOREIGN_CALL
+ RTLD_ENABLE_FOREIGN_CALL;
+#endif
+
result = _dl_lookup_symbol_x (strtab + sym->st_name, l, &sym, l->l_scope,
version, ELF_RTYPE_CLASS_PLT, flags, NULL);
@@ -118,6 +122,10 @@ _dl_fixup (
if (!RTLD_SINGLE_THREAD_P)
THREAD_GSCOPE_RESET_FLAG ();
+#ifdef RTLD_FINALIZE_FOREIGN_CALL
+ RTLD_FINALIZE_FOREIGN_CALL;
+#endif
+
/* Currently result contains the base load address (or link map)
of the object that defines sym. Now add in the symbol
offset. */