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

This commit is contained in:
joerg 2011-11-18 16:10:02 +00:00
parent 22f467edff
commit 10dc456d4b
4 changed files with 12 additions and 7 deletions

View File

@ -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

View File

@ -0,0 +1,5 @@
#include "SYS.h"
ENTRY(__aeabi_read_tp)
mrc p15, 0, r0, c13, c0, 3
RET

View File

@ -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 @@ _rtld_relocate_nonplt_objects(Obj_Entry *obj)
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 @@ _rtld_relocate_nonplt_objects(Obj_Entry *obj)
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, "

View File

@ -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 @@ typedef volatile int __cpu_simple_lock_t;
#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