aboutsummaryrefslogtreecommitdiff
path: root/libexec/rtld-elf
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2006-03-28 06:09:24 +0000
committerDavid Xu <davidxu@FreeBSD.org>2006-03-28 06:09:24 +0000
commitc0d2338cdd226c89b5efde952c0e82d8cb9960d8 (patch)
treeac985a06120dcffc30366f910f16d1483f8eccad /libexec/rtld-elf
parent20df0de426fb7f044eefab742a918a3b29c6a87c (diff)
Notes
Diffstat (limited to 'libexec/rtld-elf')
-rw-r--r--libexec/rtld-elf/amd64/reloc.c2
-rw-r--r--libexec/rtld-elf/i386/reloc.c2
-rw-r--r--libexec/rtld-elf/rtld.c2
-rw-r--r--libexec/rtld-elf/sparc64/reloc.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c
index 8f25278c0556..8a32adfc4121 100644
--- a/libexec/rtld-elf/amd64/reloc.c
+++ b/libexec/rtld-elf/amd64/reloc.c
@@ -384,7 +384,7 @@ allocate_initial_tls(Obj_Entry *objs)
*/
tls_static_space = tls_last_offset + RTLD_STATIC_TLS_EXTRA;
amd64_set_fsbase(allocate_tls(objs, 0,
- 2*sizeof(Elf_Addr), sizeof(Elf_Addr)));
+ 3*sizeof(Elf_Addr), sizeof(Elf_Addr)));
}
void *__tls_get_addr(tls_index *ti)
diff --git a/libexec/rtld-elf/i386/reloc.c b/libexec/rtld-elf/i386/reloc.c
index 809f16ec132f..ec83bff982dc 100644
--- a/libexec/rtld-elf/i386/reloc.c
+++ b/libexec/rtld-elf/i386/reloc.c
@@ -336,7 +336,7 @@ allocate_initial_tls(Obj_Entry *objs)
* use.
*/
tls_static_space = tls_last_offset + RTLD_STATIC_TLS_EXTRA;
- tls = allocate_tls(objs, NULL, 2*sizeof(Elf_Addr), sizeof(Elf_Addr));
+ tls = allocate_tls(objs, NULL, 3*sizeof(Elf_Addr), sizeof(Elf_Addr));
i386_set_gsbase(tls);
}
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index e164ef8580a0..9824c3e91d5c 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -2707,7 +2707,7 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcbsize, size_t tcbalign)
size = tls_static_space;
- tls = malloc(size);
+ tls = calloc(1, size);
dtv = calloc(1, (tls_max_index + 2) * sizeof(Elf_Addr));
*(Elf_Addr**) tls = dtv;
diff --git a/libexec/rtld-elf/sparc64/reloc.c b/libexec/rtld-elf/sparc64/reloc.c
index f264860311cb..dc0d83069822 100644
--- a/libexec/rtld-elf/sparc64/reloc.c
+++ b/libexec/rtld-elf/sparc64/reloc.c
@@ -731,7 +731,7 @@ allocate_initial_tls(Obj_Entry *objs)
* use.
*/
tls_static_space = tls_last_offset + RTLD_STATIC_TLS_EXTRA;
- tp = allocate_tls(objs, NULL, 2*sizeof(Elf_Addr), sizeof(Elf_Addr));
+ tp = allocate_tls(objs, NULL, 3*sizeof(Elf_Addr), sizeof(Elf_Addr));
}
void *__tls_get_addr(tls_index *ti)