mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
* elf/dl-load.c (_dl_map_object_from_fd): Don't check DF_STATIC_TLS.
* elf/dl-reloc.c (_dl_relocate_object: CHECK_STATIC_TLS): New macro to signal error if an IE-model TLS reloc resolved to a dlopen'd module. * sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela): Call it after performing TPOFF relocs. * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise. * elf/dl-conflict.c (CHECK_STATIC_TLS): New macro (no-op). * elf/dl-close.c (remove_slotinfo): Change asserts so as not to crash when closing a partially-initialized object. * elf/dl-load.c (_dl_map_object_from_fd) [! USE_TLS]: Call lose instead of _dl_fatal_printf when we see PT_TLS.
This commit is contained in:
@ -957,7 +957,9 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
|
||||
#else
|
||||
/* Uh-oh, the binary expects TLS support but we cannot
|
||||
provide it. */
|
||||
_dl_fatal_printf ("cannot handle file '%s' with TLS data\n", name);
|
||||
errval = 0;
|
||||
errstring = N_("cannot handle TLS data");
|
||||
goto call_lose;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@ -1173,11 +1175,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
|
||||
|
||||
/* Make sure we are not dlopen'ing an object
|
||||
that has the DF_1_NOOPEN flag set. */
|
||||
if ((__builtin_expect (l->l_flags_1 & DF_1_NOOPEN, 0)
|
||||
#ifdef USE_TLS
|
||||
|| __builtin_expect (l->l_flags & DF_STATIC_TLS, 0)
|
||||
#endif
|
||||
)
|
||||
if (__builtin_expect (l->l_flags_1 & DF_1_NOOPEN, 0)
|
||||
&& (mode & __RTLD_DLOPEN))
|
||||
{
|
||||
/* We are not supposed to load this object. Free all resources. */
|
||||
|
Reference in New Issue
Block a user