Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Hook up TLS support on ARM. Tested by martin@, kernel suppor...



details:   https://anonhg.NetBSD.org/src/rev/fbd1268465d2
branches:  trunk
changeset: 771291:fbd1268465d2
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Nov 18 16:10:02 2011 +0000

description:
Hook up TLS support on ARM. Tested by martin@, kernel support from matt@

diffstat:

 lib/libc/arch/arm/Makefile.inc          |  4 ++--
 lib/libc/arch/arm/sys/__aeabi_read_tp.S |  5 +++++
 libexec/ld.elf_so/arch/arm/mdreloc.c    |  6 ++----
 sys/arch/arm/include/types.h            |  4 +++-
 4 files changed, 12 insertions(+), 7 deletions(-)

diffs (71 lines):

diff -r 2934b2efc2bf -r fbd1268465d2 lib/libc/arch/arm/Makefile.inc
--- a/lib/libc/arch/arm/Makefile.inc    Fri Nov 18 15:56:53 2011 +0000
+++ b/lib/libc/arch/arm/Makefile.inc    Fri Nov 18 16:10:02 2011 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile.inc,v 1.9 2010/07/06 05:59:52 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.10 2011/11/18 16:10:02 joerg Exp $
 
 .include <bsd.own.mk>
 
-SRCS+= __sigaction14_sigtramp.c __sigtramp2.S
+SRCS+= __aeabi_read_tp.S __sigaction14_sigtramp.c __sigtramp2.S
 
 CPPFLAGS += -DSOFTFLOAT
 
diff -r 2934b2efc2bf -r fbd1268465d2 lib/libc/arch/arm/sys/__aeabi_read_tp.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/arm/sys/__aeabi_read_tp.S   Fri Nov 18 16:10:02 2011 +0000
@@ -0,0 +1,5 @@
+#include "SYS.h"
+
+ENTRY(__aeabi_read_tp)
+       mrc p15, 0, r0, c13, c0, 3
+       RET
diff -r 2934b2efc2bf -r fbd1268465d2 libexec/ld.elf_so/arch/arm/mdreloc.c
--- a/libexec/ld.elf_so/arch/arm/mdreloc.c      Fri Nov 18 15:56:53 2011 +0000
+++ b/libexec/ld.elf_so/arch/arm/mdreloc.c      Fri Nov 18 16:10:02 2011 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: mdreloc.c,v 1.36 2011/04/12 16:40:04 matt Exp $        */
+/*     $NetBSD: mdreloc.c,v 1.37 2011/11/18 16:10:03 joerg Exp $       */
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: mdreloc.c,v 1.36 2011/04/12 16:40:04 matt Exp $");
+__RCSID("$NetBSD: mdreloc.c,v 1.37 2011/11/18 16:10:03 joerg Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -179,7 +179,6 @@
                        rdbg(("COPY (avoid in main)"));
                        break;
 
-#ifdef __HAVE_TLS_VARIANT_I
                case R_TYPE(TLS_DTPOFF32):
                        def = _rtld_find_symdef(symnum, obj, &defobj, false);
                        if (def == NULL)
@@ -232,7 +231,6 @@
                            obj->strtab + obj->symtab[symnum].st_name,
                            obj->path, (void *)tmp));
                        break;
-#endif /* __HAVE_TLS_VARIANT_I */
 
                default:
                        rdbg(("sym = %lu, type = %lu, offset = %p, "
diff -r 2934b2efc2bf -r fbd1268465d2 sys/arch/arm/include/types.h
--- a/sys/arch/arm/include/types.h      Fri Nov 18 15:56:53 2011 +0000
+++ b/sys/arch/arm/include/types.h      Fri Nov 18 16:10:02 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: types.h,v 1.20 2011/07/17 23:46:49 dyoung Exp $        */
+/*     $NetBSD: types.h,v 1.21 2011/11/18 16:10:02 joerg Exp $ */
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -86,6 +86,8 @@
 #define        __HAVE_MINIMAL_EMUL
 #define __HAVE_CPU_DATA_FIRST
 #define        __HAVE___LWP_GETPRIVATE_FAST
+#define        __HAVE_COMMON___TLS_GET_ADDR
+#define        __HAVE_TLS_VARIANT_I
 
 #if defined(_KERNEL)
 #define        __HAVE_RAS



Home | Main Index | Thread Index | Old Index