1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +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:
Roland McGrath
2002-10-17 12:10:17 +00:00
parent d29724f870
commit 2430d57a13
11 changed files with 67 additions and 22 deletions

View File

@@ -53,18 +53,22 @@ remove_slotinfo (size_t idx, struct dtv_slotinfo_list *listp, size_t disp)
else
{
struct link_map *old_map = listp->slotinfo[idx - disp].map;
assert (old_map != NULL);
/* Mark the entry as unused. */
listp->slotinfo[idx - disp].gen = GL(dl_tls_generation) + 1;
listp->slotinfo[idx - disp].map = NULL;
/* The entry might still be in its unused state if we are closing an
object that wasn't fully set up. */
if (__builtin_expect (old_map != NULL, 1))
{
assert (old_map->l_tls_modid == idx);
/* Mark the entry as unused. */
listp->slotinfo[idx - disp].gen = GL(dl_tls_generation) + 1;
listp->slotinfo[idx - disp].map = NULL;
}
/* If this is not the last currently used entry no need to look
further. */
if (old_map->l_tls_modid != GL(dl_tls_max_dtv_idx))
if (idx != GL(dl_tls_max_dtv_idx))
return true;
assert (old_map->l_tls_modid == GL(dl_tls_max_dtv_idx));
}
while (idx - disp > disp == 0 ? 1 + GL(dl_tls_static_nelem) : 0)