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/arch/hppa Handle some TLS relocs.
details: https://anonhg.NetBSD.org/src/rev/9793a8683005
branches: trunk
changeset: 763221:9793a8683005
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Mar 14 08:21:54 2011 +0000
description:
Handle some TLS relocs.
diffstat:
libexec/ld.elf_so/arch/hppa/hppa_reloc.c | 30 ++++++++++++++++++++++++++++--
1 files changed, 28 insertions(+), 2 deletions(-)
diffs (51 lines):
diff -r f172a5e0c87a -r 9793a8683005 libexec/ld.elf_so/arch/hppa/hppa_reloc.c
--- a/libexec/ld.elf_so/arch/hppa/hppa_reloc.c Mon Mar 14 08:20:15 2011 +0000
+++ b/libexec/ld.elf_so/arch/hppa/hppa_reloc.c Mon Mar 14 08:21:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hppa_reloc.c,v 1.35 2011/03/10 12:53:42 skrll Exp $ */
+/* $NetBSD: hppa_reloc.c,v 1.36 2011/03/14 08:21:54 skrll Exp $ */
/*-
* Copyright (c) 2002, 2004 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hppa_reloc.c,v 1.35 2011/03/10 12:53:42 skrll Exp $");
+__RCSID("$NetBSD: hppa_reloc.c,v 1.36 2011/03/14 08:21:54 skrll Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -473,6 +473,32 @@
rdbg(("COPY (avoid in main)"));
break;
+ case R_TYPE(TLS_DTPMOD32):
+ def = _rtld_find_symdef(symnum, obj, &defobj, false);
+ if (def == NULL)
+ return -1;
+
+ *where = (Elf_Addr)(defobj->tlsindex);
+
+ rdbg(("TLS_DTPMOD32 %s in %s --> %p",
+ obj->strtab + obj->symtab[symnum].st_name,
+ obj->path, (void *)*where));
+
+ break;
+
+ case R_TYPE(TLS_DTPOFF32):
+ def = _rtld_find_symdef(symnum, obj, &defobj, false);
+ if (def == NULL)
+ return -1;
+
+ *where = (Elf_Addr)(def->st_value);
+
+ rdbg(("TLS_DTPOFF32 %s in %s --> %p",
+ obj->strtab + obj->symtab[symnum].st_name,
+ obj->path, (void *)*where));
+
+ break;
+
default:
rdbg(("sym = %lu, type = %lu, offset = %p, "
"addend = %p, contents = %p, symbol = %s",
Home |
Main Index |
Thread Index |
Old Index