Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/ld.elf_so Fill in TLS related fields in dl_iterate_p...
details: https://anonhg.NetBSD.org/src/rev/3ac7dd147b50
branches: trunk
changeset: 763217:3ac7dd147b50
user: joerg <joerg%NetBSD.org@localhost>
date: Sun Mar 13 21:08:45 2011 +0000
description:
Fill in TLS related fields in dl_iterate_phdr if TLS is supported
diffstat:
libexec/ld.elf_so/rtld.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (35 lines):
diff -r 80b8d1988740 -r 3ac7dd147b50 libexec/ld.elf_so/rtld.c
--- a/libexec/ld.elf_so/rtld.c Sun Mar 13 18:23:30 2011 +0000
+++ b/libexec/ld.elf_so/rtld.c Sun Mar 13 21:08:45 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtld.c,v 1.139 2011/03/09 23:10:07 joerg Exp $ */
+/* $NetBSD: rtld.c,v 1.140 2011/03/13 21:08:45 joerg Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: rtld.c,v 1.139 2011/03/09 23:10:07 joerg Exp $");
+__RCSID("$NetBSD: rtld.c,v 1.140 2011/03/13 21:08:45 joerg Exp $");
#endif /* not lint */
#include <err.h>
@@ -1154,12 +1154,12 @@
STAILQ_FIRST(&obj->names)->name : obj->path;
phdr_info.dlpi_phdr = obj->phdr;
phdr_info.dlpi_phnum = obj->phsize / sizeof(obj->phdr[0]);
-#if 1
+#if defined(__HAVE_TLS_VARIANT_I) || defined(__HAVE_TLS_VARIANT_II)
+ phdr_info.dlpi_tls_modid = obj->tlsindex;
+ phdr_info.dlpi_tls_data = obj->tlsinit;
+#else
phdr_info.dlpi_tls_modid = 0;
phdr_info.dlpi_tls_data = 0;
-#else
- phdr_info.dlpi_tls_modid = obj->tlsindex;
- phdr_info.dlpi_tls_data = obj->tlsinit;
#endif
phdr_info.dlpi_adds = _rtld_objloads;
phdr_info.dlpi_subs = _rtld_objloads - _rtld_objcount;
Home |
Main Index |
Thread Index |
Old Index